This class is available for the OPUS Blackboard API. The initial OPUS 2.0 release is described here
Description
This class is an abstract base class for all OPUS exceptions. Methods are included for generating string descriptions of the exception type and the object that is associated with the exception where applicable.
Example:
#include#include #include #include "opus_exceptions.h" //The following example demonstrates the throwing and catching of //OPUS exceptions int main(int argc, char* argv[]) { try { string problem("This was the problem."); throw Bad_val (problem, problem); } catch(Opus_exception& oe) { cerr << "An OPUS exception occurred:" << endl; cerr << oe.which() << endl << oe.str() << endl; } try { errno = 5; throw Severe (errno, strerror(errno)); } catch(Opus_exception& oe) { cerr << "An OPUS exception occurred:" << endl; cerr << oe.which() << endl << oe.str() << endl; } return(0); }
See Also:
Class: No_entry - Exception for missing data.
Synopsis
No_entry(T, const string& = ""); No_entry(const No_entry&); ~No_entry(); string which() const; // report info on exception type string str() const; // report info on exception target
Description
This exception is thrown when a request for some data item failed because the item was not found.
Class: Bad_val - Exception for bad values.
Synopsis
Bad_val(T, const string& = ""); Bad_val(const Bad_val&); ~Bad_val(); string which() const; // report info on exception type string str() const; // report info on exception target
Description
This exception is thrown when a passed in value is no good for its intended purpose.
Class: Type - Exception for improper types.
Synopsis
Type(T, const string& = ""); Type(const Type&); ~Type(); string which() const; // report info on exception type string str() const; // report info on exception target
Description
This exception is thrown when an improper type was used in a call to a function.
Class: Io_error - Exception for I/O errors.
Synopsis
Io_error(T, const string& = ""); Io_error(const Io_error&); ~Io_error(); string which() const; // report info on exception Io_error string str() const; // report info on exception target
Description
Class: Locked - Exception for locked resources.
Synopsis
Locked(T, const string& = ""); Locked(const Locked&); ~Locked(); string which() const; // report info on exception Locked string str() const; // report info on exception target
Description
This exception is thrown when a requested resource is locked.
Class: Ambiguous - Exception for ambiguous operation.
Synopsis
Ambiguous(T, const string& = ""); Ambiguous(const Ambiguous&); ~Ambiguous(); string which() const; // report info on exception Ambiguous string str() const; // report info on exception target
Description
This exception is thrown when a requested action cannot be completed due to some ambiguity.
Class: Severe - Exception for severe errors.
Synopsis
Severe(T, const string& = ""); Severe(const Severe&); ~Severe(); string which() const; // report info on exception Severe string str() const; // report info on exception target
Description
This exception is thrown when processing stopped due to an unrecoverable condition.
Class: Not_ready - Exception for operations not ready to complete.
Synopsis
Not_ready(T, const string& = ""); Not_ready(const Not_ready&); ~Not_ready(); string which() const; // report info on exception Not_ready string str() const; // report info on exception target
Description
This exception is thrown when a request cannot be completed because a critical item is not ready or initialized.
Class: Already - Exception for duplicate action requests.
Synopsis
Already(T, const string& = ""); Already(const Already&); ~Already(); string which() const; // report info on exception Already string str() const; // report info on exception target
Description
This exception is thrown when a request for some data item has already been made or initialization is attempted more than once.
Class: Corrupt - Exception for corrupt data.
Synopsis
Corrupt(T, const string& = ""); Corrupt(const Corrupt&); ~Corrupt(); string which() const; // report info on exception Corrupt string str() const; // report info on exception target
Description
This exception is thrown when data corruption is detected.
Class: Exec - Exception for execution failures.
Synopsis
Exec(T, const string& = ""); Exec(const Exec&); ~Exec(); string which() const; // report info on exception Exec string str() const; // report info on exception target
Description
This exception is thrown when an attempt to execute some external task fails.
Class: File_action - Exception indicating a File_action is to be performed.
Synopsis
File_action(T, const string& = ""); File_action(const File_action&); ~File_action(); string which() const; // report info on exception File_action string str() const; // report info on exception target
Description
This exception is thrown when a modification to some File_entry field detects that a FILE_ACTION command should be performed. The template contains the command label for the FILE_ACTION command on the Command Blackboard.
See Also: