Exception class template for handling and logging errors.
More...
#include <utility_data_RDL.hpp>
|
| logData (std::string str, DATA_T data, const std::source_location &loc=std::source_location::current()) |
| Constructs an OmegaException with an error message and user data.
|
|
std::string & | what () |
| Retrieves the error message.
|
|
const std::string & | what () const noexcept |
| Retrieves the error message (const version).
|
|
const std::source_location & | where () const noexcept |
| Retrieves the source location of the exception.
|
|
DATA_T & | data () |
| Retrieves the user-defined data.
|
|
const DATA_T & | data () const noexcept |
| Retrieves the user-defined data (const version).
|
|
|
void | logError () const |
| Logs the error message to a file. If the logfile cannot be opened, an error message is printed to std::cerr.
|
|
template<typename DATA_T>
class rdlib_log::logData< DATA_T >
Exception class template for handling and logging errors.
- Template Parameters
-
DATA_T | Type of additional data to store with the error. |
◆ logData()
template<typename DATA_T >
rdlib_log::logData< DATA_T >::logData |
( |
std::string |
str, |
|
|
DATA_T |
data, |
|
|
const std::source_location & |
loc = std::source_location::current() |
|
) |
| |
|
inline |
Constructs an OmegaException with an error message and user data.
- Parameters
-
str | The error message. |
data | Additional user data related to the error. |
loc | Source location of the error (defaults to current location). |
◆ data() [1/2]
template<typename DATA_T >
Retrieves the user-defined data.
- Returns
- A reference to the user data.
◆ data() [2/2]
template<typename DATA_T >
Retrieves the user-defined data (const version).
- Returns
- A constant reference to the user data.
◆ what() [1/2]
template<typename DATA_T >
Retrieves the error message.
- Returns
- A reference to the error message string.
◆ what() [2/2]
template<typename DATA_T >
Retrieves the error message (const version).
- Returns
- A constant reference to the error message string.
◆ where()
template<typename DATA_T >
Retrieves the source location of the exception.
- Returns
- A constant reference to the source location.
◆ errorLocation
template<typename DATA_T >
The source location of the error.
◆ errorString
template<typename DATA_T >
◆ userData
template<typename DATA_T >
Additional data associated with the error.
The documentation for this class was generated from the following file: