singleton class for HDF5 error handling
More...
#include <error.hpp>
This class facilitates handling of errors originating in the underlying C-API and HDF5 library. Singleton pattern assures a unique point of access to HDF5's active error stack.
◆ auto_print() [1/2]
bool hdf5::error::Singleton::auto_print |
( |
| ) |
const |
◆ auto_print() [2/2]
void hdf5::error::Singleton::auto_print |
( |
bool |
enable | ) |
|
By default, HDF5 prints the error stack to sterr upon the occurrence of every error. Turning this off redirects the stack to be passed out to the client using nested exceptions.
- Parameters
-
enable | set to true if autoprinting should be enabled, false otherwise |
◆ clear_stack()
void hdf5::error::Singleton::clear_stack |
( |
| ) |
|
◆ extract_stack()
H5CError hdf5::error::Singleton::extract_stack |
( |
| ) |
|
Only works if auto_print is disabled. Returns a Stack (derived exception) as extracted from the HDF5 error stack of the most recent error condition(s).
After the stack is extracted it will removed from the error system.
◆ instance()
static Singleton& hdf5::error::Singleton::instance |
( |
| ) |
|
|
inlinestatic |
Use this static function to access the singleton
◆ throw_with_stack()
void hdf5::error::Singleton::throw_with_stack |
( |
const std::string & |
message | ) |
|
If auto_print is enabled, throws std::runtime_error. If auto_print is disabled, it also extracts the error stack and throws a nested exception, with the Stack object one level deeper. This function is to be used by most other functions implementing this HDF5 wrapper.
- Parameters
-
message | a user-supplied message for the exception |
The documentation for this class was generated from the following file:
- /home/jenkins/h5cpp/src/h5cpp/error/error.hpp