Search in sources :

Example 1 with MySubException

use of org.glassfish.jersey.examples.exception.Exceptions.MySubException in project jersey by jersey.

the class ExceptionResource method testMySubException.

@POST
@Path("mysub")
public String testMySubException(String s) {
    String[] tokens = s.split(":");
    assert tokens.length == 2;
    int statusCode = Integer.valueOf(tokens[1]);
    Response r = Response.status(statusCode).build();
    throw new MySubException(r);
}
Also used : Response(javax.ws.rs.core.Response) MySubException(org.glassfish.jersey.examples.exception.Exceptions.MySubException) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST)

Aggregations

POST (javax.ws.rs.POST)1 Path (javax.ws.rs.Path)1 Response (javax.ws.rs.core.Response)1 MySubException (org.glassfish.jersey.examples.exception.Exceptions.MySubException)1