![]() |
Project
|
Error handling of the raw reader. More...
#include <RawDecodingError.h>
Inherits std::exception.
Public Types | |
enum class | ErrorType_t { PAGE_NOTFOUND , HEADER_DECODING , PAYLOAD_DECODING , HEADER_INVALID , PAGE_START_INVALID , PAYLOAD_INVALID , TRAILER_DECODING , TRAILER_INCOMPLETE } |
Codes for different error types. More... | |
Public Member Functions | |
RawDecodingError (ErrorType_t errtype, int fecID) | |
Constructor. | |
~RawDecodingError () noexcept override=default | |
destructor | |
const char * | what () const noexcept override |
Providing error message of the exception. | |
ErrorType_t | getErrorType () const |
Get the type identifier of the error handled with this exception. | |
int | getFECID () const |
Get the ID of the frontend electronics responsible for the error. | |
Static Public Member Functions | |
static int | ErrorTypeToInt (RawDecodingError::ErrorType_t errortype) |
Convert error type to error code number. | |
static constexpr int | getNumberOfErrorTypes () |
Get the number of error codes. | |
static ErrorType_t | intToErrorType (unsigned int errortype) |
static const char * | getErrorCodeNames (ErrorType_t errortype) |
Get name of error type. | |
static const char * | getErrorCodeNames (unsigned int errortype) |
Get name of error type. | |
static const char * | getErrorCodeTitles (ErrorType_t errortype) |
Get title of error type. | |
static const char * | getErrorCodeTitles (unsigned int errortype) |
Get title of error type. | |
static const char * | getErrorCodeDescription (ErrorType_t errortype) |
Get description of error type. | |
static const char * | getErrorCodeDescription (unsigned int errortype) |
Get description of error type. | |
Error handling of the raw reader.
The following error types are defined:
Definition at line 35 of file RawDecodingError.h.
|
strong |
Codes for different error types.
Enumerator | |
---|---|
PAGE_NOTFOUND | Page was not found (page index outside range) |
HEADER_DECODING | Header cannot be decoded (format incorrect) |
PAYLOAD_DECODING | Payload cannot be decoded (format incorrect) |
HEADER_INVALID | Header in memory not belonging to requested superpage. |
PAGE_START_INVALID | Page position starting outside payload size. |
PAYLOAD_INVALID | Payload in memory not belonging to requested superpage. |
TRAILER_DECODING | Inconsistent trailer in memory (several trailer words missing the trailer marker) |
TRAILER_INCOMPLETE | Incomplete trailer words (i.e. registers) |
Definition at line 40 of file RawDecodingError.h.
|
inline |
Constructor.
errtype | Identifier code of the error type |
Constructing the error with error code. To be called when the exception is thrown.
Definition at line 56 of file RawDecodingError.h.
|
overridedefaultnoexcept |
destructor
|
inlinestatic |
Convert error type to error code number.
Definition at line 80 of file RawDecodingError.h.
|
inlinestatic |
Get description of error type.
A dedicated description is created which can be used i.e. in the what() function of the exception.
errortype | Error type raising the exceptio (symbolic representation) |
Definition at line 210 of file RawDecodingError.h.
|
inlinestatic |
Get description of error type.
A dedicated description is created which can be used i.e. in the what() function of the exception.
errortype | Error type raising the exception (numeric representation) |
Definition at line 240 of file RawDecodingError.h.
|
inlinestatic |
Get name of error type.
A single word descriptor i.e. to be used in object names is produced.
errortype | Error type raising the exception (symbolic representation) |
Definition at line 126 of file RawDecodingError.h.
|
inlinestatic |
Get name of error type.
A single word descriptor i.e. to be used in object names is produced.
errortype | Error type raising the exception (numeric representation) |
Definition at line 156 of file RawDecodingError.h.
|
inlinestatic |
Get title of error type.
A short description i.e. to be used in histogram titles is produced.
errortype | Error type raising the exception (symbolic representation) |
Definition at line 168 of file RawDecodingError.h.
|
inlinestatic |
Get title of error type.
A short description i.e. to be used in histogram titles is produced.
errortype | Error type raising the exception (numeric representation) |
Definition at line 198 of file RawDecodingError.h.
|
inline |
Get the type identifier of the error handled with this exception.
Definition at line 72 of file RawDecodingError.h.
|
inline |
Get the ID of the frontend electronics responsible for the error.
Definition at line 76 of file RawDecodingError.h.
|
inlinestaticconstexpr |
Get the number of error codes.
Definition at line 107 of file RawDecodingError.h.
|
inlinestatic |
Definition at line 109 of file RawDecodingError.h.
|
inlineoverridenoexcept |
Providing error message of the exception.
Definition at line 65 of file RawDecodingError.h.