18 #include "ErrorHandler.h" 19 #include "PhoneHome.h" 43 throw(std::runtime_error(message));
46 std::cerr << message <<
"\nExiting" << std::endl;
47 PhoneHome::completionStatus(
"ErrorHandler: Exiting due to Error");
54 std::cerr << message <<
"\nUnknown Handle Type: Exiting" 56 PhoneHome::completionStatus(
"Exiting, ErrorHandler::unknown handle type.");
just return failure on the error
exit the program on the error
ErrorHandler()
Constructor.
throw an exception for the error
HandlingType
This specifies how this class should respond to errors.
~ErrorHandler()
Destructor.
static void handleError(const char *message, HandlingType handlingType=EXCEPTION)
Handle an error based on the error handling type.