version 3.3

VRS::ErrorHandler Class Reference

#include <vrs/errorhandler.h>

List of all members.

Public Types

enum  KindOfError { PROGRAM_ERROR, ARGUMENT_ERROR, WARNING, NOIMPL }
enum  KindOfAction { DO_ABORT, DO_EXIT, DO_CONTINUE, THROW_EXCEPTION }
typedef void(* Function )(int errortype, const char *expr, const char *file, int line, const char *text)

Static Public Member Functions

static Function setHandler (int errortype, Function funct)
 Sets a new function for the error handling of the given kind and returns the old one.
static int setAction (int errortype, int action)
 Sets a action for the error handling of the given kind and returns the old one.
static void callHandler (int errortype, const char *expr, const char *file, int line)
 This method executes the handler currently associated with the given kind of error.
static std::ostream & newErrorOutputStringStream ()
static std::string getLastError ()
static void enableErrorLogging (bool enable)
 Enables/disables logging of all errors via VRS::Logger() By default this is turned off.


Member Typedef Documentation

typedef void(* VRS::ErrorHandler::Function)(int errortype, const char *expr, const char *file, int line, const char *text)


Member Enumeration Documentation

Enumerator:
PROGRAM_ERROR 
ARGUMENT_ERROR 
WARNING 
NOIMPL 

Enumerator:
DO_ABORT 
DO_EXIT 
DO_CONTINUE 
THROW_EXCEPTION 


Member Function Documentation

static Function VRS::ErrorHandler::setHandler ( int  errortype,
Function  funct 
) [static]

Sets a new function for the error handling of the given kind and returns the old one.

static int VRS::ErrorHandler::setAction ( int  errortype,
int  action 
) [static]

Sets a action for the error handling of the given kind and returns the old one.

static void VRS::ErrorHandler::callHandler ( int  errortype,
const char *  expr,
const char *  file,
int  line 
) [static]

This method executes the handler currently associated with the given kind of error.

Based on the action defined, the method aborts, exits, continues or throws an exception. In general, this method is called by the error macros and not directly by the programmer.

static std::ostream& VRS::ErrorHandler::newErrorOutputStringStream (  )  [static]

Returns an empty string stream into which an error message must be written before callHandler is invoked. The current content of the returned stream will be given to the handling function as text.

static std::string VRS::ErrorHandler::getLastError (  )  [static]

On WIN32 systems returns the formatted error string which is associated with GetLastError(). On all other systems this method is not implemented yet!

static void VRS::ErrorHandler::enableErrorLogging ( bool  enable  )  [static]

Enables/disables logging of all errors via VRS::Logger() By default this is turned off.


The documentation for this class was generated from the following file:

Generated on Sat May 25 06:00:23 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact