#include <Exception.h>
Inheritance diagram for Sct::AbstractThrowable:
Public Member Functions | |
virtual | ~AbstractThrowable () throw () |
virtual long | sendToMrs (SEVERITY s) throw () |
Send the message to the message reporting service. | |
virtual long | sendToMrs () const throw () |
Send the message to the message reporting service. | |
virtual void | setSeverity (SEVERITY s) throw () |
Set the severity of this exception. | |
virtual SEVERITY | getSeverity () const throw () |
Get the severity. | |
virtual const char * | what () const throw () |
Override of std::exception::what(). | |
virtual const Throwable * | getCause () const throw () |
Get the cause. | |
virtual shared_ptr< Throwable > | clone () const throw () |
Necessary for chaining of exceptions unfortunately. | |
Protected Member Functions | |
AbstractThrowable () throw () | |
To ease implementation in long exception hierarchies, sub-classes can provide a default constructor then must use the initialize method in all substansive constructors. | |
virtual string | getMessage () const throw () |
Gets the detail message for this. | |
void | initialize (const string &id, const string &name, const string &msg, Throwable *cause, const string &file, int line) throw () |
Protected Attributes | |
string | id |
string | name |
string | msg |
string | file |
int | line |
SEVERITY | severity |
shared_ptr< Throwable > | cause |
string | text |
An exception should not rely on adding extra parameters to an MRS message as if it is nested, it won't get this opportunity.
If a sub-class has its own data members or overrides any methods then it should override the clone() method also. Most sub-classes will probably just provide constuctors in the same pattern as shown for the Error and Exception classes.
Definition at line 93 of file Exception.h.
|
To ease implementation in long exception hierarchies, sub-classes can provide a default constructor then must use the initialize method in all substansive constructors.
Definition at line 14 of file Exception.cpp. Referenced by clone(). |
|
Necessary for chaining of exceptions unfortunately. Should return a copy of this allocated on the heap. It is necessary for sub-classes to override this if they add new data members or if they do and special processing in what() or sentToMrs() Implements Sct::Throwable. Reimplemented in Sct::CorbaExceptionWrapper, Sct::IsException, Sct::FileException, Sct::NoSuchStreamerException, and Sct::OutOfRangeError< T >. Definition at line 65 of file Exception.cpp. References AbstractThrowable(). Here is the call graph for this function: ![]() |
|
Get the cause.
Implements Sct::Throwable. Definition at line 61 of file Exception.cpp. References cause. |
|
Gets the detail message for this.
Reimplemented in Sct::CorbaExceptionWrapper, Sct::IsException, Sct::FileException, Sct::NoSuchStreamerException, and Sct::OutOfRangeError< T >. Definition at line 57 of file Exception.cpp. References msg. |
|
Get the severity.
Implements Sct::Throwable. Definition at line 33 of file Exception.cpp. References severity. Referenced by sendToMrs(). |
|
Send the message to the message reporting service.
Implements Sct::Throwable. Definition at line 22 of file Exception.cpp. References getSeverity(), Sct::SctNames::Mrs(), msg, and what(). Here is the call graph for this function: ![]() |
|
|
Set the severity of this exception.
Implements Sct::Throwable. Definition at line 29 of file Exception.cpp. |
|
Override of std::exception::what(). Returns hasCause() ? msg + "\ncaused by:\n" + cause.msg : msg; If you override this you should also override the clone method. Definition at line 37 of file Exception.cpp. References file, line, name, and text. Referenced by SctApi::doRawScanThread(), SctApi::readHistogramToIS(), SctCalibrationController::CalibrationControllerImpl::sctApiError(), and sendToMrs(). |