Java Code Examples for javax.ws.rs.NotFoundException#getMessage()
The following examples show how to use
javax.ws.rs.NotFoundException#getMessage() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NotFoundExceptionMapper.java From jweb-cms with GNU Affero General Public License v3.0 | 5 votes |
@Override public Response toResponse(NotFoundException exception) { ExceptionResponse response = new ExceptionResponse(); response.errorMessage = exception.getMessage(); return Response.status(404).entity(response) .type(MediaType.APPLICATION_JSON).build(); }
Example 2
Source File: ErrorMessage.java From demo-rest-jersey-spring with MIT License | 4 votes |
public ErrorMessage(NotFoundException ex){ this.status = Response.Status.NOT_FOUND.getStatusCode(); this.message = ex.getMessage(); this.link = "https://jersey.java.net/apidocs/2.8/jersey/javax/ws/rs/NotFoundException.html"; }