public class ServerFailure
extends java.lang.Object
This error reporting mechanism is adequate at best. When RequestFactory is extended to handle polymorphic types, this class will likely be replaced with something more expressive.
Constructor and Description |
---|
ServerFailure()
Constructs a ServerFailure with null properties.
|
ServerFailure(java.lang.String message)
Constructs a fatal ServerFailure with null type and null stack trace.
|
ServerFailure(java.lang.String message,
java.lang.String exceptionType,
java.lang.String stackTraceString,
boolean fatal)
Constructs a ServerFailure object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExceptionType()
Return the exception type.
|
java.lang.String |
getMessage()
Return the failure message.
|
RequestContext |
getRequestContext()
Returns the RequestContext that triggered the ServerFailure.
|
java.lang.String |
getStackTraceString()
Return the failure stack trace.
|
boolean |
isFatal()
Return true if this is a fatal error.
|
void |
setRequestContext(RequestContext requestContext)
Sets the RequestContext to return via
getRequestContext() . |
public ServerFailure()
public ServerFailure(java.lang.String message)
public ServerFailure(java.lang.String message, java.lang.String exceptionType, java.lang.String stackTraceString, boolean fatal)
message
- a String containing the failure messageexceptionType
- a String containing the exception typestackTraceString
- a String containing the stack tracepublic java.lang.String getExceptionType()
public java.lang.String getMessage()
public RequestContext getRequestContext()
public java.lang.String getStackTraceString()
public boolean isFatal()
Receiver.onFailure(com.google.web.bindery.requestfactory.shared.ServerFailure)
throws a runtime exception for fatal failures.public void setRequestContext(RequestContext requestContext)
getRequestContext()
.