|
SFrame 3.6
|
SFrame exception class. More...
#include <core/include/SError.h>


Public Types | |
| enum | Severity { SkipEvent = 1, SkipFile = 2, SkipInputData = 3, SkipCycle = 4, StopExecution = 5 } |
| Severity enumeration. More... | |
Public Member Functions | |
| SError (Severity severity=SkipEvent) throw () | |
| Constructor specifying only a severity. | |
| SError (const char *description, Severity severity=SkipEvent) throw () | |
| Constructor with description and severity. | |
| SError (const SError &parent) throw () | |
| Copy constructor. | |
| virtual | ~SError () throw () |
| Destructor. | |
| void | SetDescription (const char *description) throw () |
| Set the description of the exception. | |
| void | SetSeverity (Severity severity) throw () |
| Set the severity of the exception. | |
| virtual const char * | what () const throw () |
| Get the description of the exception. | |
| virtual Severity | request () const throw () |
| Get the severity of the exception. | |
| template<class T > | |
| SError & | operator<< (T arg) |
| Function to get the std::ostream functionality. | |
SFrame exception class.
Class for all exceptions used in SFrame. All the exceptions should provide a description of the occurence and an "action request" to the framework.
FirstCycle.cxx, FirstCycle.h, SecondCycle.cxx, and SecondCycle.h.
| enum SError::Severity |
Severity enumeration.
The exception can request an action from the framework. This can be one of the actions described by the enumeration values.
| SkipEvent |
The current event should be skipped from being written |
| SkipFile |
Processing of the current file should stop |
| SkipInputData |
Processing of the current input data type should stop |
| SkipCycle |
Running of the current cycle should stop |
| StopExecution |
SFrame should stop completely |
| SError::SError | ( | Severity | severity = SkipEvent | ) | throw () |
Constructor specifying only a severity.
This constructor is used most often in the code. You just specify a severity to the event, then fill the description using the std::ostream functionality of the object, finally throw the exception object.
| severity | The action request of the exception |
Definition at line 26 of file SError.cxx.
| SError::SError | ( | const char * | description, |
| Severity | severity = SkipEvent |
||
| ) | throw () |
Constructor with description and severity.
This constructor is useful for throwing exceptions with a simple explanation. For such exceptions you don't have to create an exception object, but can throw the exception like this:
throw SError( "Skip this event", SError::SkipEvent );
| description | Explanation for the occurance |
| severity | The action request of the exception |
Definition at line 43 of file SError.cxx.
| SError::SError | ( | const SError & | parent | ) | throw () |
Copy constructor.
I think this copy constructor is necessary for the correct handling of the exception objects. It clones the original object completely.
| parent | The object to clone |
Definition at line 57 of file SError.cxx.
| SError::~SError | ( | ) | throw () [virtual] |
| SError& SError::operator<< | ( | T | arg | ) | [inline] |
| SError::Severity SError::request | ( | ) | const throw () [virtual] |
Get the severity of the exception.
Definition at line 93 of file SError.cxx.
Referenced by SCycleBaseNTuple::DeclareVariable(), SCycleBaseNTuple::GetMetadataTree(), SCycleController::Initialize(), and SCycleBaseExec::Process().
| void SError::SetDescription | ( | const char * | description | ) | throw () |
Set the description of the exception.
Definition at line 73 of file SError.cxx.
| void SError::SetSeverity | ( | Severity | severity | ) | throw () |
Set the severity of the exception.
Definition at line 80 of file SError.cxx.
| const char * SError::what | ( | ) | const throw () [virtual] |
Get the description of the exception.
Definition at line 87 of file SError.cxx.
Referenced by SCycleBaseExec::Begin(), SCycleBaseNTuple::DeclareVariable(), SCycleBaseNTuple::GetMetadataTree(), SCycleController::Initialize(), SCycleBaseExec::Notify(), SCycleBaseExec::Process(), SCycleBaseExec::SlaveBegin(), SCycleBaseExec::SlaveTerminate(), and SCycleBaseExec::Terminate().