oscript.data
Class OException

java.lang.Object
  extended byoscript.data.Value
      extended byoscript.data.OObject
          extended byoscript.data.OException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
OIllegalArgumentException, OJavaException, ONoSuchMemberException, ONullReferenceException, OUnsupportedOperationException

public class OException
extends OObject

Base class for the script type "Exception". This isn't a java exception, but instead is wrapped in a PackagedScriptObjectException.

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

Field Summary
static java.lang.String[] MEMBER_NAMES
           
static java.lang.String PARENT_TYPE_NAME
           
static Value TYPE
          The type object for an instance of Exception.
static java.lang.String TYPE_NAME
           
 
Fields inherited from class oscript.data.OObject
EMPTY_EXPR_LIST_EVALUATOR
 
Fields inherited from class oscript.data.Value
DEBUG, NULL, UNDEFINED
 
Constructor Summary
  OException(MemberTable args)
          Class Constructor.
  OException(java.lang.String str)
          Class Constructor.
protected OException(Value type, java.lang.String str)
          Class Constructor.
 
Method Summary
 java.lang.String castToString()
          Convert this object to a native java String value.
protected static java.lang.String getArg0(MemberTable args)
           
 java.lang.String getMessage()
          Get the message.
protected  Value getTypeImpl()
          Get the type of this object.
 void preserveStackFrame()
           
 java.util.Iterator stackFrameIterator()
          Return an iteration of stack frames, starting with the most deeply nested stack frame.
 
Methods inherited from class oscript.data.OObject
getMember, populateMemberSet
 
Methods inherited from class oscript.data.Value
_getTypeMember, _populateTypeMemberSet, bopBitwiseAnd, bopBitwiseAndR, bopBitwiseOr, bopBitwiseOrR, bopBitwiseXor, bopBitwiseXorR, bopCast, bopCastR, bopDivide, bopDivideR, bopEquals, bopEqualsR, bopGreaterThan, bopGreaterThanOrEquals, bopGreaterThanOrEqualsR, bopGreaterThanR, bopInstanceOf, bopInstanceOfR, bopLeftShift, bopLeftShiftR, bopLessThan, bopLessThanOrEquals, bopLessThanOrEqualsR, bopLessThanR, bopLogicalAnd, bopLogicalAndR, bopLogicalOr, bopLogicalOrR, bopMinus, bopMinusR, bopMultiply, bopMultiplyR, bopNotEquals, bopNotEqualsR, bopPlus, bopPlusR, bopRemainder, bopRemainderR, bopSignedRightShift, bopSignedRightShiftR, bopUnsignedRightShift, bopUnsignedRightShiftR, callAsConstructor, callAsConstructor, callAsConstructor, callAsExtends, callAsExtends, callAsExtends, callAsFunction, callAsFunction, callAsFunction, castToBoolean, castToExactNumber, castToInexactNumber, castToJavaObject, elementAt, elementsAt, getMember, getMember, getMember, getMember, getMember, getMonitor, getType, getTypeMember, getTypeMember, isA, length, memberSet, noSuchMember, opAssign, populateTypeMemberSet, readExternal, toString, unhand, uopBitwiseNot, uopDecrement, uopIncrement, uopLogicalNot, uopMinus, uopPlus, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final Value TYPE
The type object for an instance of Exception.


PARENT_TYPE_NAME

public static final java.lang.String PARENT_TYPE_NAME
See Also:
Constant Field Values

TYPE_NAME

public static final java.lang.String TYPE_NAME
See Also:
Constant Field Values

MEMBER_NAMES

public static final java.lang.String[] MEMBER_NAMES
Constructor Detail

OException

public OException(java.lang.String str)
Class Constructor.


OException

protected OException(Value type,
                     java.lang.String str)
Class Constructor. This is the constructor called from built-in types that subclss Exception.


OException

public OException(MemberTable args)
Class Constructor. This is the constructor that is called via a BuiltinType instance.

Parameters:
args - arguments to this constructor
Throws:
PackagedScriptObjectException(Exception) - if wrong number of args
Method Detail

preserveStackFrame

public final void preserveStackFrame()

getTypeImpl

protected Value getTypeImpl()
Get the type of this object. The returned type doesn't have to take into account the possibility of a script type extending a built-in type, since that is handled by Value.getType().

Overrides:
getTypeImpl in class OObject
Returns:
the object's type

getArg0

protected static final java.lang.String getArg0(MemberTable args)

castToString

public java.lang.String castToString()
                              throws PackagedScriptObjectException
Convert this object to a native java String value.

Overrides:
castToString in class OObject
Returns:
a String value
Throws:
PackagedScriptObjectException(NoSuchMethodException)
PackagedScriptObjectException

getMessage

public java.lang.String getMessage()
Get the message.

Returns:
a String value

stackFrameIterator

public java.util.Iterator stackFrameIterator()
Return an iteration of stack frames, starting with the most deeply nested stack frame.

Returns:
an iterator of StackFrames