org.apache.fop.render.afp.exceptions
Class NestedRuntimeException
RuntimeException
org.apache.fop.render.afp.exceptions.NestedRuntimeException
public abstract class NestedRuntimeException
extends RuntimeException
Handy class for wrapping runtime Exceptions with a root cause.
This technique is no longer necessary in Java 1.4, which provides
built-in support for exception nesting. Thus exceptions in applications
written to use Java 1.4 need not extend this class.
NestedRuntimeException(String msg) - Construct a
NestedRuntimeException with the specified detail message.
|
NestedRuntimeException(String msg, Throwable t) - Construct a
NestedRuntimeException with the specified
detail message and nested exception.
|
String | getMessage() - Return the detail message, including the message from the nested
exception if there is one.
|
Throwable | getUnderlyingException() - Gets the original triggering exception
|
void | printStackTrace(PrintStream ps) - Print the composite message and the embedded stack trace to the specified stream.
|
void | printStackTrace(PrintWriter pw) - Print the composite message and the embedded stack trace to the specified writer.
|
NestedRuntimeException
public NestedRuntimeException(String msg)
Construct a NestedRuntimeException
with the specified detail message.
msg
- The detail message.
NestedRuntimeException
public NestedRuntimeException(String msg,
Throwable t)
Construct a NestedRuntimeException
with the specified
detail message and nested exception.
msg
- The detail message.t
- The nested exception.
getMessage
public String getMessage()
Return the detail message, including the message from the nested
exception if there is one.
getUnderlyingException
public Throwable getUnderlyingException()
Gets the original triggering exception
- The original exception as a throwable.
printStackTrace
public void printStackTrace(PrintStream ps)
Print the composite message and the embedded stack trace to the specified stream.
printStackTrace
public void printStackTrace(PrintWriter pw)
Print the composite message and the embedded stack trace to the specified writer.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.