Drag[en]gine Game Engine  1.21
deException Class Reference

Exception class. More...

#include <deException.h>

Inheritance diagram for deException:
deeAssertion deeDirectoryNotFound deeDirectoryRead deeDivisionByZero deeFileExists deeFileNotFound deeInvalidAction deeInvalidFileFormat deeInvalidFormat deeInvalidParam deeInvalidSyntax deeNoModuleFound deeNullPointer deeOpenFile deeOutOfBoundary deeOutOfMemory deeReadFile deeScriptError deeStackEmpty deeStackOverflow deeTestFailed deeWriteFile

Public Member Functions

Constructors, Destructors
 deException (const char *name, const char *description, const char *file, int line)
 Create a new exception object. More...
 
virtual ~deException ()
 Clean up exception object. More...
 
Accessors
const decStringGetName () const
 Unique name to identify the exception. More...
 
const decStringGetDescription () const
 Description of the reason for the exception. More...
 
const decStringGetFile () const
 Name of the source file where the exception occurred. More...
 
int GetLine () const
 Line number in file where the exception occurred. More...
 
const decStringListGetBacktrace () const
 Backtrace. More...
 
Tests
bool IsNamed (const char *name) const
 Test if the exception has the given name. More...
 

Display Functions

virtual decStringList AdditionalInformation () const
 Subclass specific additional information. More...
 
decStringList FormatOutput () const
 Format output into a list of strings. More...
 
void PrintError () const
 Display a formated output of the stored information. More...
 

Detailed Description

Exception class.

Constructor & Destructor Documentation

◆ deException()

deException::deException ( const char *  name,
const char *  description,
const char *  file,
int  line 
)

Create a new exception object.

Parameters
[in]nameUnique name to identify the exception. If NULL set to a default string.
[in]descriptionDescription of the reason for the exception. If NULL set to a default string.
[in]fileName of the source file where the exception occurred. If NULL set to a default string.
[in]lineLine number in file where the exception occurred. If NULL set to a default string.

◆ ~deException()

virtual deException::~deException ( )
virtual

Clean up exception object.

Member Function Documentation

◆ AdditionalInformation()

virtual decStringList deException::AdditionalInformation ( ) const
virtual

Subclass specific additional information.

Default implementation returns an empty list.

◆ FormatOutput()

decStringList deException::FormatOutput ( ) const

Format output into a list of strings.

Clears the list and adds the following entries:

  • "Exception: {pName}"
  • "Description: {pDescription}"
  • "Source File: {pFile}"
  • "Source Line: {pLine}"
  • "BacktraceX: {pBacktrace[X]}"
  • AdditionalInformation

◆ GetBacktrace()

const decStringList& deException::GetBacktrace ( ) const
inline

Backtrace.

◆ GetDescription()

const decString& deException::GetDescription ( ) const
inline

Description of the reason for the exception.

◆ GetFile()

const decString& deException::GetFile ( ) const
inline

Name of the source file where the exception occurred.

◆ GetLine()

int deException::GetLine ( ) const
inline

Line number in file where the exception occurred.

◆ GetName()

const decString& deException::GetName ( ) const
inline

Unique name to identify the exception.

◆ IsNamed()

bool deException::IsNamed ( const char *  name) const

Test if the exception has the given name.

◆ PrintError()

void deException::PrintError ( ) const

Display a formated output of the stored information.

Print each line obtained by FormatOutput to stdout.


The documentation for this class was generated from the following file: