![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
Exception base class. More...
#include <exception.hpp>
Classes | |
| class | error_msg |
| A class representing error messages in the SatNOGS-COMMS system. More... | |
Public Types | |
| enum class | severity : uint8_t { CATASTROPHIC = 0 , CRITICAL = 1 , MAJOR = 2 , MINOR = 3 , NONE = 4 } |
| Severity levels of exceptions. More... | |
Public Member Functions | |
| exception (severity sev, const char *file, int lineno, const error_msg &err_msg) | |
| Constructor for the exception class. | |
| void | to_string (etl::string_stream &stream) const |
| Creates a string representation of the exception. | |
| void | to_string (etl::istring &s) const |
| Creates a string representation of the exception. | |
| const char * | what () const noexcept override |
| int32_t | get_errno () const |
| severity | get_severity () const |
| Get error severity level as defined in FDIR. | |
Exception base class.
Each exception of SatNOGS-COMMS control library has a severity level that allows the firmware to take actions based on the severity. In addition the class provides the filename as well as the code line from which the exception was thrown. Also two different messages are supported. A verbose one that can be used during development and terse,, concise one that can be used for logging during in-flight.
Each exception is categorized by a severity level, enabling the firmware to take appropriate actions based on the severity of the issue. Key Features of the exceptions system:
Definition at line 62 of file exception.hpp.
|
strong |
Severity levels of exceptions.
Definition at line 70 of file exception.hpp.
|
inline |
Constructor for the exception class.
| sev | The severity level of the error as defined in FDIR |
| file | The file where the exception was thrown. |
| lineno | The line number where the exception was thrown. |
| err_msg | The error message object containing the error details. |
Definition at line 102 of file exception.hpp.
|
inline |
Definition at line 152 of file exception.hpp.
|
inline |
Get error severity level as defined in FDIR.
The severity levels are defined in exception::severity enum class.
Definition at line 165 of file exception.hpp.
|
inline |
Creates a string representation of the exception.
| s | a reference to an ETL string where the exception message will be stored. |
Definition at line 139 of file exception.hpp.
|
inline |
Creates a string representation of the exception.
| stream | a reference to an ETL string stream where the exception message will be stored. |
Definition at line 122 of file exception.hpp.
|
inlineoverridenoexcept |
Definition at line 146 of file exception.hpp.