iError Project Site at SourceForge.net Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

iERR::iError Class Reference

The error class. More...

#include <iError.h>

List of all members.

Public Types

enum  ErrorLevel {
  iINFO = 0, iWARNING = 1, iCRITICAL = 2, iEXCEPTION = 3,
  iASSERTION = 4
}
 
  • iINFO the execution successed, but user should get some notification.
More...



Public Methods

 iError ()
 Constructor. More...

ErrorLevel GetErrorLevel () const
 The error level of the error (iINFO, iWARNING, iCRITICAL, iEXCEPTION or iASSERTION). More...

iErrorCodeGetErrorCode () const
 The error code of the error. More...

const char * GetDescription ()
 Get the description of the error. More...

const char * GetDebugInfo ()
 Get the debug info. More...

 operator long () const
 The integer value that identifies the error code. More...


Protected Methods

void SetErrorCode (ErrorLevel errLevel, iErrorCode *errCode)
 Reset the error code and debug info. More...

void SetIntegerParam (int idx, int value)
 Set the integer parameter of the error. More...

void SetDoubleParam (int idx, double value)
 Set the integer parameter of the error. More...

void SetStringParam (int idx, const char *value)
 Set the integer parameter of the error. More...

void SetVoidParam (int idx, void *value)
 Set the integer parameter of the error. More...

void AddDebugInfo (const char *functionName, const char *fileName, int lineNr)
 Add the debug info. More...


Private Attributes

ErrorLevel m_ErrorLevel
 Error level of the last error. More...

iErrorCodem_ErrorCode
 @label error type of the last error @supplierRole error type @supplierCardinality 1. More...

const char * m_File [32]
 File, where the last error occured. More...

const char * m_Function [32]
 File, where the last error occured. More...

int m_Line [32]
 Line, where the last error occured. More...

int m_LastDebugInfo
 Index, where to put the next debug info. More...

char m_Description [1024]
 Buffer to hold the description of the last error. More...

char m_DebugInfo [32 *128]
 Buffer to hold the debug info of the last error. More...

CDescriptionParam m_Param [8]
 Array of description parameters for the last error. More...


Friends

class iErrorHandler


Detailed Description

The error class.

A pointer to this class is thrown as exception or returned by the LastError call.

Definition at line 287 of file iError.h.


Member Enumeration Documentation

enum iERR::iError::ErrorLevel
 

  • iINFO the execution successed, but user should get some notification.

  • iWARNING the execution successed, but there could be errors.
  • iCRITICAL the execution wasn't successed.
  • iEXCEPTION execution breaked off.
  • iASSERTION an assertion is invalid.
Enumeration values:
iINFO 
iWARNING 
iCRITICAL 
iEXCEPTION 
iASSERTION 

Definition at line 301 of file iError.h.


Constructor & Destructor Documentation

iERR::iError::iError  
 

Constructor.

Use iThrow to create errors and handle them by default handler.

Definition at line 415 of file iError.cpp.

References iERR::UNKNOWN().


Member Function Documentation

void iERR::iError::AddDebugInfo const char *    functionName,
const char *    fileName,
int    lineNr
[protected]
 

Add the debug info.

Definition at line 607 of file iError.cpp.

References ERR_MAX_STACK_DEPTH, m_File, m_Function, m_LastDebugInfo, and m_Line.

const char * iERR::iError::GetDebugInfo  
 

Get the debug info.

Definition at line 540 of file iError.cpp.

References ERR_MAX_DEBUG_DESCRIPTION, m_DebugInfo, m_File, m_Function, m_LastDebugInfo, and m_Line.

const char * iERR::iError::GetDescription  
 

Get the description of the error.

(already substituted)

Definition at line 438 of file iError.cpp.

References ERR_MAX_DESCRIPTION, m_Description, m_ErrorCode, and m_Param.

iErrorCode * iERR::iError::GetErrorCode   const
 

The error code of the error.

Definition at line 431 of file iError.cpp.

References m_ErrorCode.

iError::ErrorLevel iERR::iError::GetErrorLevel   const
 

The error level of the error (iINFO, iWARNING, iCRITICAL, iEXCEPTION or iASSERTION).

Definition at line 424 of file iError.cpp.

References m_ErrorLevel.

iERR::iError::operator long   const
 

The integer value that identifies the error code.

as given by the constructor of iErrorCode.

Definition at line 557 of file iError.cpp.

References m_ErrorCode.

void iERR::iError::SetDoubleParam int    idx,
double    value
[protected]
 

Set the integer parameter of the error.

Definition at line 586 of file iError.cpp.

References m_Param.

void iERR::iError::SetErrorCode ErrorLevel    errLevel,
iErrorCode   errCode
[protected]
 

Reset the error code and debug info.

Definition at line 570 of file iError.cpp.

References m_ErrorCode, m_ErrorLevel, and m_LastDebugInfo.

void iERR::iError::SetIntegerParam int    idx,
int    value
[protected]
 

Set the integer parameter of the error.

Definition at line 579 of file iError.cpp.

References m_Param.

void iERR::iError::SetStringParam int    idx,
const char *    value
[protected]
 

Set the integer parameter of the error.

Definition at line 593 of file iError.cpp.

References m_Param.

void iERR::iError::SetVoidParam int    idx,
void *    value
[protected]
 

Set the integer parameter of the error.

Definition at line 600 of file iError.cpp.

References m_Param.


Friends And Related Function Documentation

friend class iErrorHandler [friend]
 

Definition at line 290 of file iError.h.


Member Data Documentation

char iERR::iError::m_DebugInfo[ 32 * 128 ] [private]
 

Buffer to hold the debug info of the last error.

Definition at line 396 of file iError.h.

Referenced by GetDebugInfo().

char iERR::iError::m_Description[ 1024 ] [private]
 

Buffer to hold the description of the last error.

Definition at line 393 of file iError.h.

Referenced by GetDescription().

iErrorCode* iERR::iError::m_ErrorCode [private]
 

@label error type of the last error @supplierRole error type @supplierCardinality 1.

Definition at line 378 of file iError.h.

Referenced by GetDescription(), GetErrorCode(), operator long(), and SetErrorCode().

ErrorLevel iERR::iError::m_ErrorLevel [private]
 

Error level of the last error.

Definition at line 371 of file iError.h.

Referenced by GetErrorLevel(), and SetErrorCode().

const char* iERR::iError::m_File[ 32 ] [private]
 

File, where the last error occured.

Definition at line 381 of file iError.h.

Referenced by AddDebugInfo(), and GetDebugInfo().

const char* iERR::iError::m_Function[ 32 ] [private]
 

File, where the last error occured.

Definition at line 384 of file iError.h.

Referenced by AddDebugInfo(), and GetDebugInfo().

int iERR::iError::m_LastDebugInfo [private]
 

Index, where to put the next debug info.

Definition at line 390 of file iError.h.

Referenced by AddDebugInfo(), GetDebugInfo(), and SetErrorCode().

int iERR::iError::m_Line[ 32 ] [private]
 

Line, where the last error occured.

Definition at line 387 of file iError.h.

Referenced by AddDebugInfo(), and GetDebugInfo().

CDescriptionParam iERR::iError::m_Param[ 8 ] [private]
 

Array of description parameters for the last error.

Definition at line 399 of file iError.h.

Referenced by GetDescription(), SetDoubleParam(), SetIntegerParam(), SetStringParam(), and SetVoidParam().


The documentation for this class was generated from the following files:
© 2002 by C-LAB
generated by doxygen