public class ErrorHandler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ErrorHandler.UnknownServerException
Exception used as a place holder if the server returns an error without a stack trace.
|
Constructor and Description |
---|
ErrorHandler() |
ErrorHandler(boolean includeServerErrors) |
ErrorHandler(ErrorCodes codes,
boolean includeServerErrors) |
Modifier and Type | Method and Description |
---|---|
boolean |
isIncludeServerErrors() |
void |
setIncludeServerErrors(boolean includeServerErrors) |
Response |
throwIfResponseFailed(Response response,
long duration) |
public ErrorHandler()
public ErrorHandler(boolean includeServerErrors)
includeServerErrors
- Whether to include server-side details in thrown exceptions if the
information is available.public ErrorHandler(ErrorCodes codes, boolean includeServerErrors)
includeServerErrors
- Whether to include server-side details in thrown exceptions if the
information is available.codes
- The ErrorCodes object to use for linking error codes to exceptions.public boolean isIncludeServerErrors()
public void setIncludeServerErrors(boolean includeServerErrors)
public Response throwIfResponseFailed(Response response, long duration) throws RuntimeException
RuntimeException
Copyright © 2015. All rights reserved.