de.hs_rm.cs.lecturenotes.client.core.logical
Class ErrorHandler

java.lang.Object
  extended by de.hs_rm.cs.lecturenotes.client.core.logical.ErrorHandler

public final class ErrorHandler
extends java.lang.Object

General Error Handler Utility class.

Version:
$LastChangedRevision: 231 $
Author:
Enrico Homann

Method Summary
static void handleCallbackFailure(java.lang.Throwable caught)
          Handles a usual callback failure.
static void handleCallbackSuccess(ResponseStatusEnum result, java.lang.String failure, java.lang.String success)
          Default success callback result handling for callbacks that deliver ResponseStatusEnum objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

handleCallbackFailure

public static void handleCallbackFailure(java.lang.Throwable caught)
Handles a usual callback failure.

Parameters:
caught - Throwable

handleCallbackSuccess

public static void handleCallbackSuccess(ResponseStatusEnum result,
                                         java.lang.String failure,
                                         java.lang.String success)
Default success callback result handling for callbacks that deliver ResponseStatusEnum objects. Displays a simple alert box to the user, depended of FAILURE or SUCCESS. failure and success provide the String objects used.

Parameters:
result - ResponseStatusEnum
failure - String
success - String