Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LOW_exception Class Reference

Base class for all exception of this library. More...

#include <LOW_exception.h>

Inheritance diagram for LOW_exception:

Inheritance graph
[legend]
List of all members.

Public Methods

 LOW_exception ()
 Default constructor. More...

 LOW_exception (const std::string inMsg, const std::string inFile, const int inLine)
 Constructor. More...

 LOW_exception (const int inErrNum, const std::string inMsg, const std::string inFile, const int inLine)
 Constructor for OS errors. More...

 ~LOW_exception ()
 Destructor. More...

void logException (const std::string inPrefix="")
 Log the exception via LOW_helper_msglog::printError(). More...


Static Public Methods

void setLogOnCreation (const bool inLogOnCreation)
 Set wether exceptions should be logged automatically when created. More...

bool getLogOnCreation ()
 Get wether exceptions are logged automatically when created. More...


Public Attributes

const int errNum
 OS error number. More...

const string message
 Descriptive message. More...

const string file
 File from which exception was thrown. More...

const int line
 Line number where exception was thrown. More...


Static Protected Attributes

bool logOnCreation = false
 Inicates wether exception should be logged automatically when the are created. More...


Detailed Description

Base class for all exception of this library.

Author:
Harald Roelle, Helmut Reiser

Definition at line 40 of file LOW_exception.h.


Constructor & Destructor Documentation

LOW_exception::LOW_exception  
 

Default constructor.

Definition at line 36 of file LOW_exception.cpp.

LOW_exception::LOW_exception const std::string    inMsg,
const std::string    inFile,
const int    inLine
 

Constructor.

Parameters:
inMsg  Message describing the exception.
inFile  File from which exception is thrown.
inLine  Line number where exception is thrown.

Definition at line 42 of file LOW_exception.cpp.

References logException().

LOW_exception::LOW_exception const int    inErrNum,
const std::string    inMsg,
const std::string    inFile,
const int    inLine
 

Constructor for OS errors.

The textual OS description (perror) is added automatically when exception is logged.

Parameters:
inErrNum  OS error number.
inMsg  Message describing the exception.
inFile  File from which exception is thrown.
inLine  Line number where exception is thrown.

Definition at line 52 of file LOW_exception.cpp.

References logException().

LOW_exception::~LOW_exception  
 

Destructor.

Definition at line 62 of file LOW_exception.cpp.


Member Function Documentation

bool LOW_exception::getLogOnCreation   [static]
 

Get wether exceptions are logged automatically when created.

Returns:
Wether exceptions are logged automatically.

Definition at line 78 of file LOW_exception.cpp.

References logOnCreation.

void LOW_exception::logException const std::string    inPrefix = ""
 

Log the exception via LOW_helper_msglog::printError().

Parameters:
inPrefix  Prefix to prepend to the log message.

Definition at line 89 of file LOW_exception.cpp.

References errNum, file, line, message, LOW_helper_msglog::printError(), and LOW_helper_msglog::printPerror().

Referenced by LOW_exception().

void LOW_exception::setLogOnCreation const bool    inLogOnCreation [static]
 

Set wether exceptions should be logged automatically when created.

Parameters:
inLogOnCreation  Wether exceptions should be logged automatically.

Definition at line 72 of file LOW_exception.cpp.

References logOnCreation.


Member Data Documentation

const int LOW_exception::errNum
 

OS error number.

Definition at line 50 of file LOW_exception.h.

Referenced by logException().

const string LOW_exception::file
 

File from which exception was thrown.

Definition at line 52 of file LOW_exception.h.

Referenced by logException().

const int LOW_exception::line
 

Line number where exception was thrown.

Definition at line 53 of file LOW_exception.h.

Referenced by logException().

bool LOW_exception::logOnCreation = false [static, protected]
 

Inicates wether exception should be logged automatically when the are created.

Definition at line 28 of file LOW_exception.cpp.

Referenced by getLogOnCreation(), and setLogOnCreation().

const string LOW_exception::message
 

Descriptive message.

Definition at line 51 of file LOW_exception.h.

Referenced by logException().


The documentation for this class was generated from the following files:
Generated on Sun Jan 12 21:07:56 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001