OBError Class Reference

Customizable error handling and logging -- store a message, including the method yielding the error, causes, etc. More...

#include <oberror.h>

List of all members.

Public Member Functions

 OBError (const std::string &method="", const std::string &errorMsg="", const std::string &explanation="", const std::string &possibleCause="", const std::string &suggestedRemedy="", const obMessageLevel=obDebug)
 Constructor for an error message e.g. OBError(__FUNCTION__, " message ").
std::string message (void) const
 
Returns:
a formatted message string, including optional explanations, etc.

std::string GetMethod ()
std::string GetError ()
std::string GetExplanation ()
std::string GetPossibleCause ()
std::string GetSuggestedRemedy ()
obMessageLevel GetLevel ()

Protected Attributes

std::string _method
std::string _errorMsg
std::string _explanation
std::string _possibleCause
std::string _suggestedRemedy
obMessageLevel _level

Friends

std::ostream & operator<< (std::ostream &os, const OBError &er)
 Output a formatted message string.


Detailed Description

Customizable error handling and logging -- store a message, including the method yielding the error, causes, etc.


Constructor & Destructor Documentation

OBError ( const std::string &  method = "",
const std::string &  errorMsg = "",
const std::string &  explanation = "",
const std::string &  possibleCause = "",
const std::string &  suggestedRemedy = "",
const   obMessageLevel = obDebug 
)

Constructor for an error message e.g. OBError(__FUNCTION__, " message ").


Member Function Documentation

string message ( void   )  const

Returns:
a formatted message string, including optional explanations, etc.

std::string GetMethod (  )  [inline]

std::string GetError (  )  [inline]

std::string GetExplanation (  )  [inline]

std::string GetPossibleCause (  )  [inline]

std::string GetSuggestedRemedy (  )  [inline]

obMessageLevel GetLevel (  )  [inline]


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const OBError er 
) [friend]

Output a formatted message string.


Member Data Documentation

std::string _method [protected]

std::string _errorMsg [protected]

std::string _explanation [protected]

std::string _possibleCause [protected]

std::string _suggestedRemedy [protected]

obMessageLevel _level [protected]


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