![]() |
Project
|
Handling of STU reconstruction errors. More...
#include <STUDecoderError.h>
Inherits std::exception.
Public Types | |
enum class | ErrorCode_t { PAGE_ERROR , WORD_UNEXPECTED , INDEX_UNEXPECTED , ADC_OVERFLOW , FEEID_UNEXPECTED , OLD_PAYLOAD_VERSION , FULL_PAYLOAD_SIZE_UNEXPECTED , SHORT_PAYLOAD_SIZE_UNEXPECTED , UNKNOWN } |
Error codes of STU decoding. More... | |
Public Member Functions | |
STUDecoderError (int ddlID, ErrorCode_t errcode) | |
Constructor. | |
~STUDecoderError () noexcept final=default | |
Destructor. | |
const char * | what () const noexcept final |
Access to error message. | |
int | getDDLID () const noexcept |
Get the ID of the DDL in which the exception is raised. | |
ErrorCode_t | getErrorCode () const noexcept |
Get error code of the exception. | |
void | printStream (std::ostream &stream) const |
Print details of the error on the stream. | |
Static Public Member Functions | |
static int | errorCodeToInt (ErrorCode_t errorcode) |
Get integer representation of error code. | |
static ErrorCode_t | intToErrorCode (int errorcode) |
Convert integer to error code. | |
static std::string | getErrorCodeName (ErrorCode_t errorcode) |
Get the name of the error code. | |
static std::string | getErrorCodeName (int errorcode) |
Get the name of the error code. | |
static std::string | getErrorCodeTitle (ErrorCode_t errorcode) |
Get the title of the error code. | |
static std::string | getErrorCodeTitle (int errorcode) |
Get the title of the error code. | |
Handling of STU reconstruction errors.
In order to distinguish different error types the STUDecoder error carries an error code which can be uniquely identified with a condition raising the excpetion. Source is always the DDL of the STU raising the exception.
Definition at line 30 of file STUDecoderError.h.
|
strong |
Error codes of STU decoding.
Definition at line 35 of file STUDecoderError.h.
STUDecoderError::STUDecoderError | ( | int | ddlID, |
ErrorCode_t | errcode | ||
) |
Constructor.
ddlID | ID of the DDL for which the exception is raised |
errcode | Error code of the exception |
Definition at line 17 of file STUDecoderError.cxx.
|
finaldefaultnoexcept |
Destructor.
|
static |
Get integer representation of error code.
errorcode | Error code |
Definition at line 33 of file STUDecoderError.cxx.
|
inlinenoexcept |
Get the ID of the DDL in which the exception is raised.
Definition at line 91 of file STUDecoderError.h.
|
inlinenoexcept |
|
static |
Get the name of the error code.
errorcode | Error code |
Definition at line 65 of file STUDecoderError.cxx.
|
inlinestatic |
Get the name of the error code.
errorcode | Error code (integer representation) |
Definition at line 65 of file STUDecoderError.h.
|
static |
Get the title of the error code.
errorcode | Error code |
Definition at line 88 of file STUDecoderError.cxx.
|
inlinestatic |
Get the title of the error code.
errorcode | Error code (integer representation) |
Definition at line 75 of file STUDecoderError.h.
|
static |
Convert integer to error code.
errorcode | Error code as integer |
Definition at line 56 of file STUDecoderError.cxx.
void STUDecoderError::printStream | ( | std::ostream & | stream | ) | const |
Print details of the error on the stream.
stream | Stream to print on |
Helper function for streaming operator
Definition at line 23 of file STUDecoderError.cxx.
|
inlinefinalnoexcept |