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", "text/plain"}) 13 public class ErrorResource { 14 @GET 15 @Path("/uncaughtInternalError") 16 public Object get(@QueryParam("message") String message) { 17 throw new IllegalStateException(message); 18 } 19 }