public class DebugErrorHandler extends Object implements ServerErrorHandler, ClientErrorHandler
This is not suitable for use in production as it exposes internal information about your application via stack traces.
Constructor and Description |
---|
DebugErrorHandler() |
Modifier and Type | Method and Description |
---|---|
void |
error(Context context,
Exception exception)
Prints the stacktrace of the given exception to the response with a 500 status. |
void |
error(Context context,
int statusCode)
Prints the string "Client error «statusCode»" to the response as text with the given status code.
|
public void error(Context context, Exception exception)
Prints the stacktrace
of the given exception to the response with a 500 status.error
in interface ServerErrorHandler
context
- The context being processedexception
- The exception that occurredpublic void error(Context context, int statusCode)
error
in interface ClientErrorHandler
context
- The contextstatusCode
- The 4xx status code that explains the problem