org.mozilla.javascript

Class WrappedException


public class WrappedException
extends EvaluatorException

A wrapper for runtime exceptions. Used by the JavaScript runtime to wrap and propagate exceptions that occur during runtime.

Author:
Norris Boyd

Constructor Summary

WrappedException(Throwable exception)
Create a new exception wrapped around an existing exception.

Method Summary

String
getLocalizedMessage()
Gets the localized message.
String
getMessage()
Get the message for the exception.
Throwable
getWrappedException()
Get the wrapped exception.
Object
unwrap()
Deprecated. Use getWrappedException() instead.

Methods inherited from class org.mozilla.javascript.EvaluatorException

getColumnNumber, getLineNumber, getLineSource, getSourceName

Constructor Details

WrappedException

public WrappedException(Throwable exception)
Create a new exception wrapped around an existing exception.

Parameters:
exception - the exception to wrap

Method Details

getLocalizedMessage

public String getLocalizedMessage()
Gets the localized message. Delegates to the wrapped exception.


getMessage

public String getMessage()
Get the message for the exception. Delegates to the wrapped exception.


getWrappedException

public Throwable getWrappedException()
Get the wrapped exception.

Returns:
the exception that was presented as a argument to the constructor when this object was created


unwrap

public Object unwrap()

Deprecated. Use getWrappedException() instead.