public static HttpResponseException errorWithoutStack ( final int code , final String errorMessage ) { return new HttpResponseException ( ) { public void generateResponse ( StaplerRequest req , StaplerResponse rsp , Object node ) throws IOException , ServletException { rsp . sendError ( code , errorMessage ) ; } } ; }
Sends an error without a stack trace .