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

CapiError Class Reference

General and base class for errors in the Capi abstraction layer. More...

#include <capiexception.h>

Inheritance diagram for CapiError:

CapiExternalError CapiMsgError CapiWrongState List of all members.

Public Methods

 CapiError (string errormsg, string function_name)
 Constructor. Create an object, print error message and abort if severity FATAL was chosen.

virtual string message ()
 Return nice formatted error message.


Protected Attributes

string errormsg
 textual error message

string function_name
 function/method where this error occured


Detailed Description

General and base class for errors in the Capi abstraction layer.

This is the general class for all Capi errors. It serves as base class for the more specific exceptions and also as one-size-fits-all throwable object if the other errors doesn't fit. ;-)

Each exception gets a severity (Warning, Error or Fatal), a message and the name of the function where it occurred. If you need further data, please derive a sub-class or format it into the errormsg.

Author:
Gernot Hillier


Constructor & Destructor Documentation

CapiError::CapiError string    errormsg,
string    function_name
[inline]
 

Constructor. Create an object, print error message and abort if severity FATAL was chosen.

Parameters:
errormsg  some informal message describing the error
function_name  name of the function which throws this exception


Member Function Documentation

virtual string CapiError::message   [inline, virtual]
 

Return nice formatted error message.

Returns the string "Classname: error message occured in function()"

Returns:
error message

Reimplemented in CapiWrongState, CapiMsgError, and CapiExternalError.


Member Data Documentation

string CapiError::errormsg [protected]
 

textual error message

string CapiError::function_name [protected]
 

function/method where this error occured


The documentation for this class was generated from the following file:
Generated on Mon Jan 5 12:20:00 2004 for CapiSuite by doxygen1.2.18