Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::lcore::LCoreError Class Reference

Represents an error, may be inside a thrown exception. More...

#include <LCore/LCoreError.h>

Inheritance diagram for strmod::lcore::LCoreError:

Inheritance graph
[legend]
List of all members.

Public Methods

 LCoreError (const char *desc=0, const char *sourcefile=0, unsigned int line=0, const char *func=0) throw ()
 LCoreError (const char *desc, const CompilerInfo &inf) throw ()
 Contruct an LCoreError with a description, and a CompilerInfo object.

 LCoreError (const CompilerInfo &inf) throw ()
 Construct an LCoreError with a CompilerInfo object, but no description.

const char * getDesc () const throw ()
 Get the description, may return NULL.

const char * getSourceFile () const throw ()
 Get the source file, may return NULL.

unsigned int getLine () const throw ()
 Get the line number.

const char * getFunc () const throw ()
 Get the function name, may return NULL.


Detailed Description

Represents an error, may be inside a thrown exception.

This is a very simple class. It just holds pointers to information. It expects that the information it points to will not go away. In fact, it's best if the information being pointed to consists of all constant strings allocated at program start and never destroyed.

This class is designed to be able to be embedded inside of an exception. It does no dynamic allocation, or any other operation capable of throwing an exception for this reason.

Derived classes need to be designed with the idea that there is no virtual destructor. They should also handle 'slicing' elegantly.

Everything in this class is 'const' so that the class may also be easily used in threading situations. This also requires that everything the class points at be similarily immutable.

Definition at line 78 of file LCoreError.h.


Constructor & Destructor Documentation

strmod::lcore::LCoreError::LCoreError const char *    desc = 0,
const char *    sourcefile = 0,
unsigned int    line = 0,
const char *    func = 0
throw () [inline, explicit]
 

Parameters:
desc A general description of the context of the error.
sourcefile The name of the file the error occured in.
line The line number the error occured on.
func The name of the function the error occured in.

Definition at line 146 of file LCoreError.h.


The documentation for this class was generated from the following file:
Generated on Wed Jan 29 00:32:48 2003 for libNet by doxygen1.3-rc1