GWT Exception Serialization

To serialize an exception to the client during an RPC call:

  1. The exception needs to be declared in the throws clause of the RPC method.
  2. The exception itself needs to be serializable.

When the rpc method throws the exception gwt converts it into JavaScript Exception object and when the  onFailure(Throwable) is invoked the exception is passed as a param to the method.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s