2005/5/9

     
 

class Throwable

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::lang::Throwable Class Reference

#include <Throwable.h>

Inheritance diagram for acdk::lang::Throwable:

acdk::lang::Object acdk::io::Serializable acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::lang::Error acdk::lang::Exception acdk::tools::aunit::TestException org::omg::PortableServer::AdapterInactive acdk::lang::OutOfMemoryError acdk::lang::StackOverflowError acdk::lang::SystemError acdk::lang::ThreadDeath TestException acdk::io::IOException acdk::lang::ClassCastException acdk::lang::CloneNotSupportedException acdk::lang::IllegalAccessException acdk::lang::InstantiationException acdk::lang::InterruptedException acdk::lang::reflect::InvocationTargetException acdk::lang::RuntimeException acdk::security::GeneralSecurityException acdk::sql::SQLException acdk::text::ParseException acdk::tools::mc::CMCException acdk::xml::parsers::ParserConfigurationException acdkx::orb::OrbException org::omg::CORBA::portable::ApplicationException org::omg::CORBA::portable::RemarshalException org::w3c::dom::DOMException List of all members.

Detailed Description

Throwable is the root of all exceptions in the framework.

There is also a mayor different regarding Memory Management of exceptions. You cannot throw R[exceptionname], because otherwise structured catches will not work. API: Java

Author:
Roger Rene Kommer
Version:
Revision
1.28
Date:
Date
2005/04/09 19:26:51


Public Member Functions

 Throwable ()
 Default constructor.

 Throwable (IN(RString) what, IN(RThrowable) cause=Nil)
  with given string describing the reason.

 Throwable (IN(RThrowable) cause)
virtual ~Throwable ()
virtual RString getMessage ()
virtual RThrowable getCause ()
virtual RThrowable initCause (IN(RThrowable) cause)
virtual void printStackTrace (IN(acdk::io::RPrintWriter) out)
 print call stack to given writer

virtual void printStackTrace ()
 print call stack to System::err

virtual RStackFrameArray getStackFrames ()
 return stackTrace

bool equals (IN(RThrowable) obj)
bool equals (IN(RObject) obj)
 Normally check for equality (not identity) Object::equals() is true only if both objects are the same instance.

virtual void writeObject (IN(acdk::io::RObjectWriter) out, IN(RClass) cls)
 Standard implementation for serialization.

void throwException (bool onlyIfHasMeta=false)

Static Public Member Functions

RObject create_instance ()
void registerThrowListener (IN(RThrowListener) listner)
void unregisterThrowListener (IN(RThrowListener) listner)
bool onThrow (IN(RThrowable) ex, int line, const char *file)

Public Attributes

::acdk::lang::sys::BackTrace _stackFrame
 native C++ Backtrace information


Protected Attributes

RString _what
RThrowable _cause

Private Attributes

RStackFrameArray _stackFrames
 this is Nil until getStackTrace will be called


Constructor & Destructor Documentation

acdk::lang::Throwable::Throwable  ) 
 

Default constructor.

acdk::lang::Throwable::Throwable IN(RString what,
IN(RThrowable cause = Nil
 

with given string describing the reason.

acdk::lang::Throwable::Throwable IN(RThrowable cause  ) 
 

virtual acdk::lang::Throwable::~Throwable  )  [virtual]
 


Member Function Documentation

RObject acdk::lang::Throwable::create_instance  )  [inline, static]
 

Reimplemented from acdk::lang::Object.

bool acdk::lang::Throwable::equals IN(RObject obj  )  [inline, virtual]
 

Normally check for equality (not identity) Object::equals() is true only if both objects are the same instance.

See also:
serialized_equals()

Reimplemented from acdk::lang::Object.

bool acdk::lang::Throwable::equals IN(RThrowable obj  )  [inline]
 

virtual RThrowable acdk::lang::Throwable::getCause  )  [virtual]
 

virtual RString acdk::lang::Throwable::getMessage  )  [virtual]
 

Returns:
description/reason of this exception

Reimplemented in acdk::lang::CmdLineParseException, acdk::lisp::LispException, acdk::tools::aunit::TestException, acdkx::com::CoException, and org::omg::CORBA::SystemException.

virtual RStackFrameArray acdk::lang::Throwable::getStackFrames  )  [virtual]
 

return stackTrace

virtual RThrowable acdk::lang::Throwable::initCause IN(RThrowable cause  )  [virtual]
 

bool acdk::lang::Throwable::onThrow IN(RThrowable ex,
int  line,
const char *  file
[static]
 

virtual void acdk::lang::Throwable::printStackTrace  )  [virtual]
 

print call stack to System::err

virtual void acdk::lang::Throwable::printStackTrace IN(acdk::io::RPrintWriter out  )  [virtual]
 

print call stack to given writer

void acdk::lang::Throwable::registerThrowListener IN(RThrowListener listner  )  [static]
 

void acdk::lang::Throwable::throwException bool  onlyIfHasMeta = false  ) 
 

void acdk::lang::Throwable::unregisterThrowListener IN(RThrowListener listner  )  [static]
 

virtual void acdk::lang::Throwable::writeObject IN(acdk::io::RObjectWriter out,
IN(RClass cls
[virtual]
 

Standard implementation for serialization.

See also:  Serialization. API: JDK / modified

Reimplemented from acdk::lang::Object.


Member Data Documentation

RThrowable acdk::lang::Throwable::_cause [protected]
 

::acdk::lang::sys::BackTrace acdk::lang::Throwable::_stackFrame
 

native C++ Backtrace information

RStackFrameArray acdk::lang::Throwable::_stackFrames [private]
 

this is Nil until getStackTrace will be called

RString acdk::lang::Throwable::_what [protected]