use of org.glassfish.jersey.examples.exception.Exceptions.MyException in project jersey by jersey.
the class ExceptionResource method testMyException.
@POST
@Path("my")
public String testMyException(String s) {
String[] tokens = s.split(":");
assert tokens.length == 2;
int statusCode = Integer.valueOf(tokens[1]);
Response r = Response.status(statusCode).build();
throw new MyException(r);
}
Aggregations