oscript.exceptions
Class PackagedScriptObjectException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oscript.exceptions.PackagedScriptObjectException
All Implemented Interfaces:
java.io.Serializable

public class PackagedScriptObjectException
extends java.lang.RuntimeException

When a script object is thrown, it is packaged as an instance of this class.

Version:
1.19
Author:
Rob Clark (rob@ti.com)
See Also:
Serialized Form

Field Summary
 Value val
          The wrapped exception object.
 
Method Summary
 java.lang.Throwable fillInStackTrace()
           
 java.lang.String getMessage()
           
static PackagedScriptObjectException makeExceptionWrapper(Value val)
          Use this method to get a new exception to throw...
static PackagedScriptObjectException makeExceptionWrapper2(Value val)
          A helper for evaluating "throw" statements, so script code can throw java exceptions
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

val

public Value val
The wrapped exception object.

Method Detail

makeExceptionWrapper

public static final PackagedScriptObjectException makeExceptionWrapper(Value val)
Use this method to get a new exception to throw... eventually we might play tricks like caching a pre-allocated exception per thread.

Parameters:
val - the script "exception" object to wrap
Returns:
a real java exception (ie PackagedScriptObjectException

makeExceptionWrapper2

public static final PackagedScriptObjectException makeExceptionWrapper2(Value val)
A helper for evaluating "throw" statements, so script code can throw java exceptions


fillInStackTrace

public java.lang.Throwable fillInStackTrace()
Overrides:
fillInStackTrace in class java.lang.Throwable

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable