javax.rad.util
Class ExceptionHandler

java.lang.Object
  extended by javax.rad.util.ExceptionHandler

public final class ExceptionHandler
extends Object

The ExceptionHandler is the global handler for program exceptions. All exceptions should handled with raise(Throwable).


Method Summary
static void addExceptionListener(IExceptionListener pListener)
          Adds a listener to the handler.
static void addExceptionListener(IExceptionListener pListener, int pIndex)
          Adds a listener to the handler, at the given position.
static IExceptionListener[] getListeners()
          Returns all registered exception listeners.
static void raise(Throwable pThrowable)
          Notifies the handler that an exception occured.
static void removeExceptionListener(IExceptionListener pListener)
          Removes a listener from the handler.
static void show(Throwable pThrowable)
          Notifies the handler that an exception occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

raise

public static void raise(Throwable pThrowable)
Notifies the handler that an exception occured. A SilentAbortException is throws anyway, for breaking the normal code flow.

Parameters:
pThrowable - the exception
Throws:
SilentAbortException - is thrown anyway to break code flow.

show

public static void show(Throwable pThrowable)
Notifies the handler that an exception occured.

Parameters:
pThrowable - the exception

addExceptionListener

public static void addExceptionListener(IExceptionListener pListener)
Adds a listener to the handler.

Parameters:
pListener - the listener

addExceptionListener

public static void addExceptionListener(IExceptionListener pListener,
                                        int pIndex)
Adds a listener to the handler, at the given position.

Parameters:
pListener - the listener
pIndex - the index or -1 to add at the end of the list

removeExceptionListener

public static void removeExceptionListener(IExceptionListener pListener)
Removes a listener from the handler.

Parameters:
pListener - the listener

getListeners

public static IExceptionListener[] getListeners()
Returns all registered exception listeners.

Returns:
a list of exception listeners


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.