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  

iError.h File Reference

Include this file to use the iError framework. More...

#include <cstring>
#include <cstdarg>

Go to the source code of this file.

Namespaces

namespace  iERR

Defines

#define __FUNCTION__   "unknown"
#define IERROR_API
#define ERR_MAX_PARAM   8
#define ERR_MAX_STACK_DEPTH   32
#define ERR_MAX_DESCRIPTION   1024
#define ERR_MAX_DEBUG_DESCRIPTION   128
#define ERR_MAX_DEBUG_INFO   ERR_MAX_STACK_DEPTH*ERR_MAX_DEBUG_DESCRIPTION
#define iLastError   iERR::iErrorHandler::Current()->LastError
 Wrapper for retriving the last error. More...

#define iThrow   iERR::iErrorHandler::Current()->Throw
 Wrapper for throwing errors. More...

#define iRethrow()   iERR::iErrorHandler::Current()->Rethrow(HERE)
 Wrapper for rethrowing errors. More...

#define iReset   iERR::iErrorHandler::Current()->Reset
 Wrapper for resetting errors. More...

#define iHandleLastError()   iERR::iErrorHandler::Current()->Handle(HERE)
 Wrapper for handling errors. More...

#define iAssert(exp)   if (!(exp)) iThrow(iError::iASSERTION,__FUNCTION__,__FILE__,__LINE__,&iERR::iERR_ASSERT, #exp)
 Wrapper for asserts. More...

#define INFO(err)   iError::iINFO,__FUNCTION__,__FILE__,__LINE__,&err
 macros used to call iThrow. More...

#define WARNING(err)   iError::iWARNING,__FUNCTION__,__FILE__,__LINE__,&err
#define CRITICAL(err)   iError::iCRITICAL,__FUNCTION__,__FILE__,__LINE__,&err
#define EXCEPTION(err)   iError::iEXCEPTION,__FUNCTION__,__FILE__,__LINE__,&err
#define HERE   __FUNCTION__,__FILE__,__LINE__
 macro used by iRethrow and iHandleLastError. More...


Detailed Description

Include this file to use the iError framework.

Definition in file iError.h.


Define Documentation

#define __FUNCTION__   "unknown"
 

Definition at line 89 of file iError.h.

#define CRITICAL err       iError::iCRITICAL,__FUNCTION__,__FILE__,__LINE__,&err
 

Definition at line 163 of file iError.h.

#define ERR_MAX_DEBUG_DESCRIPTION   128
 

Definition at line 114 of file iError.h.

Referenced by iERR::iError::GetDebugInfo().

#define ERR_MAX_DEBUG_INFO   ERR_MAX_STACK_DEPTH*ERR_MAX_DEBUG_DESCRIPTION
 

Definition at line 115 of file iError.h.

#define ERR_MAX_DESCRIPTION   1024
 

Definition at line 113 of file iError.h.

Referenced by iERR::iError::GetDescription().

#define ERR_MAX_PARAM   8
 

Definition at line 111 of file iError.h.

Referenced by iERR::iErrorCode::iErrorCode().

#define ERR_MAX_STACK_DEPTH   32
 

Definition at line 112 of file iError.h.

Referenced by iERR::iError::AddDebugInfo().

#define EXCEPTION err       iError::iEXCEPTION,__FUNCTION__,__FILE__,__LINE__,&err
 

Definition at line 164 of file iError.h.

#define HERE   __FUNCTION__,__FILE__,__LINE__
 

macro used by iRethrow and iHandleLastError.

Definition at line 169 of file iError.h.

#define iAssert exp       if (!(exp)) iThrow(iError::iASSERTION,__FUNCTION__,__FILE__,__LINE__,&iERR::iERR_ASSERT, #exp)
 

Wrapper for asserts.

example iAssert(handler != NULL);

Definition at line 155 of file iError.h.

#define IERROR_API
 

Definition at line 108 of file iError.h.

 
#define iHandleLastError      iERR::iErrorHandler::Current()->Handle(HERE)
 

Wrapper for handling errors.

example: iHandleLastError();

Definition at line 149 of file iError.h.

#define iLastError   iERR::iErrorHandler::Current()->LastError
 

Wrapper for retriving the last error.

Warning:
If the reset argument is true, then the call of iHandleError will do nothing.
See also:
iERR::iErrorHandler::LastError()

Definition at line 124 of file iError.h.

#define INFO err       iError::iINFO,__FUNCTION__,__FILE__,__LINE__,&err
 

macros used to call iThrow.

See also:
iThrow

Definition at line 161 of file iError.h.

#define iReset   iERR::iErrorHandler::Current()->Reset
 

Wrapper for resetting errors.

This should be called by procedures, that throw errors at the beginning of execution, to reset old unhandled errors. example: iReset();

Definition at line 143 of file iError.h.

 
#define iRethrow      iERR::iErrorHandler::Current()->Rethrow(HERE)
 

Wrapper for rethrowing errors.

example: iRethrow();

Definition at line 136 of file iError.h.

#define iThrow   iERR::iErrorHandler::Current()->Throw
 

Wrapper for throwing errors.

example: iThrow(WARNING(OBJ_NOT_FOUND), "myObj");

Definition at line 130 of file iError.h.

Referenced by iERR::iStdErrorHandler::_Throw().

#define WARNING err       iError::iWARNING,__FUNCTION__,__FILE__,__LINE__,&err
 

Definition at line 162 of file iError.h.

Referenced by iERR::iStdErrorHandler::_Throw().


© 2002 by C-LAB
generated by doxygen