org.apache.maven.doxia.util

Class WrappedException

public abstract class WrappedException extends Exception

Base class for exceptions which are wrappers around other exceptions. This type of exception keep a record of the original exception, that is, the one which was used to actually report a problem.
Constructor Summary
WrappedException()
Constructs an exception with no original exception and no detail message.
WrappedException(String message)
Constructs an exception with a detail message but no original exception.
WrappedException(Exception e)
Constucts an exception with an original exception but no detail message.
WrappedException(Exception e, String message)
Constucts an exception with both an original exception and an detail message.
Method Summary
ExceptiongetRootException()
Returns the original exception.

Constructor Detail

WrappedException

public WrappedException()
Constructs an exception with no original exception and no detail message.

WrappedException

public WrappedException(String message)
Constructs an exception with a detail message but no original exception.

Parameters: message the detail message

WrappedException

public WrappedException(Exception e)
Constucts an exception with an original exception but no detail message.

Parameters: e the original exception

WrappedException

public WrappedException(Exception e, String message)
Constucts an exception with both an original exception and an detail message.

Parameters: e the original exception message the detail message; if null, the detail message of the original exception if any is used instead (it is this message which is returned by {@link java.lang.Throwable#getMessage})

Method Detail

getRootException

public Exception getRootException()
Returns the original exception.

Returns: the original exception if any or null otherwise

Copyright © {inceptionYear}-2007 null. All Rights Reserved.