public class

ServerFailure

extends Object
java.lang.Object
   ↳ com.google.gwt.requestfactory.shared.ServerFailure

Class Overview

Describes a request failure on the server.

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.

Summary

Public Constructors
ServerFailure()
Constructs a ServerFailure with null properties.
ServerFailure(String message)
Constructs a fatal ServerFailure with null type and null stack trace.
ServerFailure(String message, String exceptionType, String stackTraceString, boolean fatal)
Constructs a ServerFailure object.
Public Methods
String getExceptionType()
Return the exception type.
String getMessage()
Return the failure message.
String getStackTraceString()
Return the failure stack trace.
boolean isFatal()
Return true if this is a fatal error.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ServerFailure ()

Constructs a ServerFailure with null properties.

public ServerFailure (String message)

Constructs a fatal ServerFailure with null type and null stack trace.

public ServerFailure (String message, String exceptionType, String stackTraceString, boolean fatal)

Constructs a ServerFailure object.

Parameters
message a String containing the failure message
exceptionType a String containing the exception type
stackTraceString a String containing the stack trace

Public Methods

public String getExceptionType ()

Return the exception type.

Returns
  • the exception type as a String

public String getMessage ()

Return the failure message.

Returns
  • the message as a String

public String getStackTraceString ()

Return the failure stack trace.

Returns
  • the stack trace as a String

public boolean isFatal ()

Return true if this is a fatal error. The default implementation of onFailure(ServerFailure) throws a runtime exception for fatal failures.

Returns
  • whether this is a fatal failure