Interface FailureCallback


public interface FailureCallback

This interface represents function prototype for a failed server operation.

Server calls are made asynchronously and a callback is made when the response is received. The default callbacks are Script.onSuccess(Object, Value) and Script.onFailure(Object, String).

If the failure callback is not specified in the server call the default Script.onFailure(Object, String) is called. If a function matching the signature of onFailure(Object, String) is given it will be called instead.

See Also:
Callbacks, call(Object, String, String, Value, SuccessCallback, FailureCallback)

Method Summary
 void onFailure(Object state, String errorMessage)
          Called when server operation has finished but an error has happened.
 

Method Detail

onFailure

void onFailure(Object state,
               String errorMessage)
Called when server operation has finished but an error has happened.

Parameters:
state - State object given with call(Object, String, String, Value)
errorMessage - The error message