org.openmdx.kernel.exception
Class Throwables

java.lang.Object
  extended by org.openmdx.kernel.exception.Throwables

public class Throwables
extends Object

JRE dependent exception handling methods.


Method Summary
static BasicException getCause(Throwable throwable, String exceptionDomain)
          Returns the cause belonging to a specific exception domain.
static Throwable initCause(Throwable throwable, Throwable cause, String exceptionDomain, int exceptionCode, BasicException.Parameter[] parameters, String description)
          Set a Throwable's exception stack.
static Throwable log(Throwable throwable)
          Log the throwable at warning level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

log

public static Throwable log(Throwable throwable)
Log the throwable at warning level.

Parameters:
throwable -
Returns:
th throwable

initCause

public static Throwable initCause(Throwable throwable,
                                  Throwable cause,
                                  String exceptionDomain,
                                  int exceptionCode,
                                  BasicException.Parameter[] parameters,
                                  String description)
Set a Throwable's exception stack.

Parameters:
throwable - A throwable from which the backtrace and other exception information is used.
cause - An embedded exception
exceptionDomain - An exception domain. A null objects references the default exception domain with negative exception codes only.
exceptionCode - An exception code. Negative codes describe common exceptions codes. Positive exception codes are specific for a given exception domain.
parameters - Any exception parameters, maybe null
description - The description, maybe null in which case the throwable's message is used

getCause

public static BasicException getCause(Throwable throwable,
                                      String exceptionDomain)
Returns the cause belonging to a specific exception domain.

Parameters:
exceptionDomain - the desired exception domain, or null to retrieve the initial cause.
Returns:
Either the cause belonging to a specific exception domain or the initial cause if exceptionDomain is null.


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.