5 #ifndef GOVERNANCE_EXCEPTIONS_H 6 #define GOVERNANCE_EXCEPTIONS_H 30 os <<
"GOVERNANCE_EXCEPTION_NONE";
33 os <<
"GOVERNANCE_EXCEPTION_WARNING";
36 os <<
"GOVERNANCE_EXCEPTION_PERMANENT_ERROR";
39 os <<
"GOVERNANCE_EXCEPTION_TEMPORARY_ERROR";
42 os <<
"GOVERNANCE_EXCEPTION_INTERNAL_ERROR";
67 int nNodePenaltyIn = 0)
72 std::ostringstream ostr;
73 ostr <<
eType <<
":" << strMessageIn;
79 virtual const char*
what()
const throw()
int GetNodePenalty() const
Default value, normally indicates no exception condition occurred.
const std::string & GetMessage() const
Requested operation cannot be performed.
Unexpected error (ie. should not happen unless there is a bug in the code)
Requested operation not currently possible, may resubmit later.
CGovernanceException(const std::string &strMessageIn="", governance_exception_type_enum_t eTypeIn=GOVERNANCE_EXCEPTION_NONE, int nNodePenaltyIn=0)
std::ostream & operator<<(std::ostream &os, governance_exception_type_enum_t eType)
governance_exception_type_enum_t eType
governance_exception_type_enum_t
Unusual condition requiring no caller action.
virtual const char * what() const
virtual ~CGovernanceException()
governance_exception_type_enum_t GetType() const