View Javadoc

1   package com.atlassian.plugins.rest.error;
2   
3   import javax.ws.rs.GET;
4   import javax.ws.rs.Path;
5   import javax.ws.rs.Produces;
6   import javax.ws.rs.QueryParam;
7   
8   import com.atlassian.plugins.rest.common.security.AnonymousAllowed;
9   
10  @Path("/errors")
11  @AnonymousAllowed
12  @Produces({"application/xml", "application/json"})
13  public class ErrorResource
14  {
15      @GET
16      @Path("/uncaughtInternalError")
17      public Object get(@QueryParam("message") String message)
18      {
19          throw new IllegalStateException(message);
20      }
21  }