avmplus::Exception Class Reference

#include <Exception.h>

Inheritance diagram for avmplus::Exception:

MMgc::GCObject List of all members.

Public Types

enum  { EXIT_EXCEPTION = 1 }

Public Member Functions

 Exception (Atom atom)
bool isValid ()

Public Attributes

ATOM_WB atom
int32_t flags

Detailed Description

The Exception class is used to throw all exceptions in AVM+. To throw an exception, an Exception object is instantiated and passed to AvmCore::throwException.

Definition at line 49 of file Exception.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
EXIT_EXCEPTION  An EXIT_EXCEPTION cannot be caught. It indicates that the VM is shutting down.

Definition at line 59 of file Exception.h.

00060         {
00065             EXIT_EXCEPTION = 1
00066 
00067 #ifdef DEBUGGER
00068 
00072             , SEEN_BY_DEBUGGER = 2
00073 #endif
00074         };


Constructor & Destructor Documentation

avmplus::Exception::Exception Atom  atom  ) 
 

Definition at line 54 of file Exception.cpp.

References atom, avmplus::AvmCore::atomToScriptObject(), and flags.

00059     {
00060         this->atom = atom;
00061         this->flags = 0;
00062 
00063         #ifdef DEBUGGER
00064         // If the exception atom is an Error object, copy its stack trace.
00065         // Otherwise, generate a new stack trace.
00066         if (core->istype(atom, core->traits.error_itraits))
00067         {
00068             stackTrace = ((ErrorObject*)AvmCore::atomToScriptObject(atom))->getStackTrace();
00069         }
00070         else
00071         {
00072             stackTrace = core->newStackTrace();
00073         }
00074         #endif
00075     }


Member Function Documentation

bool avmplus::Exception::isValid  ) 
 

Definition at line 77 of file Exception.cpp.

References atom, and avmplus::AtomConstants::kObjectType.

Referenced by axtam::CActiveScriptError::isSyntaxError(), and avmplus::AbcParser::parse().

00078     {
00079         return (atom&7)==kObjectType;
00080     }


Member Data Documentation

ATOM_WB avmplus::Exception::atom
 

Definition at line 82 of file Exception.h.

Referenced by Exception(), avmplus::AvmCore::findExceptionHandlerNoRethrow(), axtam::CActiveScriptError::isSyntaxError(), isValid(), avmplus::NativeID::shell_toplevel_s2a_ouu_optu4294967295U_thunkc(), and avmplus::NativeID::shell_toplevel_v2a_os_thunkc().

int32_t avmplus::Exception::flags
 

Definition at line 86 of file Exception.h.

Referenced by Exception(), avmplus::AvmCore::findExceptionHandlerNoRethrow(), avmplus::NativeID::shell_toplevel_a2a_oii_opti2_thunkc(), avmplus::NativeID::shell_toplevel_v2a_os_thunk(), and avmplus::AvmCore::throwException().


The documentation for this class was generated from the following files:
Generated on Sun Oct 12 18:51:09 2008 for Tamarin by  doxygen 1.4.6