★ wanayoo — archive 1999 http://corelinux.sourceforge.net/classref/Exception.htmlNouvelle recherche | Portail wanayoo

class corelinux::Exception

Exception is the base exception class used in the CoreLinux++ libraries.

Inheritance:


Public Classes

[more]enum Severity
Exception Severity States

Public Methods

[more] Exception( CharCptr why, CharCptr file, LineNum line, Severity severity = Exception::CONTINUABLE, bool outOfMemory = false )
Default Constructor
[more] Exception( ExceptionCref crOther )
Copy constructor
[more]void addUnwindInfo( CharCptr unwindInfo )
Append unwind information to the Exception.
[more]const string& getFile( void ) const
Accessor
[more]LineNumCref getLine( void ) const
Accessor
[more]const Severity& getSeverity( void ) const
Accessor
[more]const string& getUnwind( void ) const
Accessor
[more]const string& getWhy( void ) const
Accessor
[more]bool isOutOfMemory( void ) const
Accessor
[more]ExceptionRef operator = ( ExceptionCref otherRef )
Assignment operator overload
[more]bool operator==( ExceptionCref otherRef )
Comparisson operator overload
[more]void setProcessFatalSeverity( void )
Change the severity to Severity::PROCESSFATAL
[more]void setProcessTerminateSeverity( void )
Change the severity to Severity::PROCESSTERMINATE.
[more]void setThreadFatalSeverity( void )
Change the severity to Severity::THREADFATAL
[more]void setThreadTerminateSeverity( void )
Change the severity to Severity::THREADTERMINATE.
[more]virtual ~Exception(void)
Virtual Destructor

Protected Methods

[more] Exception( void )
Exceptions must have a reason.
[more] Exception( CharCptr file, LineNum line, Severity severity = Exception::CONTINUABLE, bool outOfMemory = false )
Exception constructor for use by derivations
[more]void setWhy( const string & )
Changes the exception reason
[more]void setWhy( CharCptr )
Changes the exception reason


Documentation

Exception is the base exception class used in the CoreLinux++ libraries. It is provided to support a rich base from which domain Exceptions may derive.
oenum Severity
Exception Severity States

o THREADFATAL
System can continue processing

o PROCESSFATAL
Exception may prove to be thread fatal

o THREADTERMINATE
Exception may prove to be process fatal

o PROCESSTERMINATE
System should kill thread

o
System should exit

o Exception( CharCptr why, CharCptr file, LineNum line, Severity severity = Exception::CONTINUABLE, bool outOfMemory = false )
Default Constructor
Parameters:
why - describes why the exception was thrown
file - The source module throwing the exception
line - The line of source throwing the exception
severity - The Exception::Severity of the Exception
outOfMemory - An out of memory indicator

o Exception( ExceptionCref crOther )
Copy constructor
Parameters:
Exception - const reference

ovirtual ~Exception(void)
Virtual Destructor

oExceptionRef operator = ( ExceptionCref otherRef )
Assignment operator overload
Returns:
Exception reference to self
Parameters:
Exception - const reference

obool operator==( ExceptionCref otherRef )
Comparisson operator overload
Returns:
true if equal, false otherwise
Parameters:
Exception - const reference

oconst string& getFile( void ) const
Accessor
Returns:
Const reference to module name where Exception was thrown

oLineNumCref getLine( void ) const
Accessor
Returns:
Const reference to line number in module where Exception was thrown

oconst string& getWhy( void ) const
Accessor
Returns:
Const reference to Exception explanation.

oconst Severity& getSeverity( void ) const
Accessor
Returns:
Const reference to Severity of Exception.

oconst string& getUnwind( void ) const
Accessor
Returns:
Const reference to the unwind stack description.

obool isOutOfMemory( void ) const
Accessor
Returns:
true if out of memory exception, false otherwise

ovoid addUnwindInfo( CharCptr unwindInfo )
Append unwind information to the Exception. Clients should use this service to identify themselves and specify any changes to severity.

ovoid setThreadFatalSeverity( void )
Change the severity to Severity::THREADFATAL

ovoid setProcessFatalSeverity( void )
Change the severity to Severity::PROCESSFATAL

ovoid setThreadTerminateSeverity( void )
Change the severity to Severity::THREADTERMINATE. This is useful to the catcher that the thread should be cleaned up.

ovoid setProcessTerminateSeverity( void )
Change the severity to Severity::PROCESSTERMINATE. This is useful to the catcher that the process should exit

o Exception( void )
Exceptions must have a reason. Default constructor is not allowed.

o Exception( CharCptr file, LineNum line, Severity severity = Exception::CONTINUABLE, bool outOfMemory = false )
Exception constructor for use by derivations

ovoid setWhy( const string & )
Changes the exception reason

ovoid setWhy( CharCptr )
Changes the exception reason


Direct child classes:
ThreadException
StorageException
SemaphoreException
NullPointerException
IteratorException
CompositeException
CommandFrameException
AbstractFactoryException



This page was generated with the help of DOC++.