Drag[en]gine Game Engine  1.0
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 occured. More...
 
int GetLine () const
 Line number in file where the exception occured. 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 informations. More...
 

Detailed Description

Exception class.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

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 occured. If NULL set to a default string.
[in]lineLine number in file where the exception occured. 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.

Referenced by GetBacktrace().

◆ 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

Referenced by GetBacktrace().

◆ GetBacktrace()

const decStringList& deException::GetBacktrace ( ) const
inline

◆ 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 occured.

◆ GetLine()

int deException::GetLine ( ) const
inline

Line number in file where the exception occured.

◆ 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.

Referenced by GetBacktrace().

◆ PrintError()

void deException::PrintError ( ) const

Display a formated output of the stored informations.

Print each line obtained by FormatOutput to stdout.

Referenced by GetBacktrace().


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