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::iErrorCode Class Reference

Class used to represent an error type. More...

#include <iError.h>

List of all members.

Public Methods

 iErrorCode (const char *description, int errCode=0)
 ~iErrorCode ()
const char * GetDescription () const
int GetErrorCode () const
 operator long () const
const char * GetSig () const
 This method is used by iErrorHandler. More...


Protected Attributes

char m_Sig [8]

Private Attributes

const char * m_Description
int m_ErrorCode


Detailed Description

Class used to represent an error type.

Create global instances of this class in the implementation file, and use them as error specification. example:

 iErrorCode OBJ_NOT_FOUND("Object s not found", 13);
 ...
 iThrow(CRITICAL(OBJ_NOT_FOUND), "myObj");
 
See also:
iERR::iErrorCode::iErrorCode()

Definition at line 236 of file iError.h.


Constructor & Destructor Documentation

iERR::iErrorCode::iErrorCode const char *    description,
int    errCode = 0
 

Parameters:
errCode  the error code as integer
description  the description of the error with % tags You can use %-tags like in printf function. The errCode parameter is optional in case you already have integer error codes in your code or as backup if iError library is not installed.

Definition at line 627 of file iError.cpp.

References ERR_MAX_PARAM, m_Description, and m_Sig.

iERR::iErrorCode::~iErrorCode  
 

Definition at line 689 of file iError.cpp.


Member Function Documentation

const char* iERR::iErrorCode::GetDescription   const [inline]
 

Returns:
the error code description (%-tags are not substituted)

Definition at line 256 of file iError.h.

References m_Description.

int iERR::iErrorCode::GetErrorCode   const [inline]
 

Returns:
the integer value, that identifies the error code (as given by the constructor)

Definition at line 261 of file iError.h.

References m_ErrorCode.

const char* iERR::iErrorCode::GetSig   const [inline]
 

This method is used by iErrorHandler.

Returns:
string where each character correspondence to the %-tag in the description

Definition at line 273 of file iError.h.

References m_Sig.

iERR::iErrorCode::operator long   const [inline]
 

Returns:
the integer value, that identifies the error code (as given by the constructor)
See also:
GetErrorCode()

Definition at line 267 of file iError.h.

References m_ErrorCode.


Member Data Documentation

const char* iERR::iErrorCode::m_Description [private]
 

Definition at line 279 of file iError.h.

Referenced by GetDescription(), and iErrorCode().

int iERR::iErrorCode::m_ErrorCode [private]
 

Definition at line 280 of file iError.h.

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

char iERR::iErrorCode::m_Sig[ 8 ] [protected]
 

Definition at line 276 of file iError.h.

Referenced by GetSig(), and iErrorCode().


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