|
WebObjects 5.4.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.webobjects.foundation.NSForwardException
public class NSForwardException
NSForwardException objects (or forwarded exceptions) are wrappers for Throwable objects which are not RuntimeExceptions. Since NSForwardException is a subclass of RuntimeException, forwarded exceptions are usually omitted from the throws clause of a method even if the original exception would have had to be declared.
NSForwardException is used within WebObjects to keep the API congruent with the WebObjects 4.5 API (which uses the Java Bridge). Apple doesn't anticipate the need for you to create NSForwardException objects. You may need to catch them, however.
NSForwardException.originalException()
,
Serialized FormConstructor Summary | |
---|---|
NSForwardException(String message,
Throwable cause)
Construct a new exception with the given message and cause. |
|
NSForwardException(Throwable wrapped)
Creates an NSForwardException from wrapped . |
|
NSForwardException(Throwable wrapped,
String extraMessage)
Creates an NSForwardException from wrapped . |
Method Summary | |
---|---|
Throwable |
originalException()
|
String |
stackTrace()
|
String |
toString()
Returns a string representation of the receiver indicating the receiver's class, its wrapped exception's class, and the wrapped exception's error message string. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NSForwardException(Throwable wrapped, String extraMessage)
wrapped
. If wrapped
is already an NSForwardException, the constructor wraps the exception's original exception.
The two-argument constructor allows you to specify an extra message; in this case, the new NSForwardException's message is wrapped
's message with extraMessage
appended.
wrapped
- the original exceptionextraMessage
- description to be attached to the original exceptionNSForwardException.originalException()
public NSForwardException(String message, Throwable cause)
NSForwardException.NSForwardException(Throwable, String)
, except the args are in the order expected by standard exception classes.
cause
- the original exceptionmessage
- description to be attached to the original exceptionNSForwardException.NSForwardException(Throwable, String)
,
RuntimeException.RuntimeException(String, Throwable)
public NSForwardException(Throwable wrapped)
wrapped
. If wrapped
is already an NSForwardException, the constructor wraps the exception's originalException
.
wrapped
- the original exceptionNSForwardException.originalException()
Method Detail |
---|
public Throwable originalException()
Throwable.getCause()
public String stackTrace()
public String toString()
toString
in class Throwable
|
Last updated June 2008 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |