Adapter object intended to be used in contexts without direct access to the output-stream object.
More...
#include <exceptions.hpp>
Adapter object intended to be used in contexts without direct access to the output-stream object.
try {
MaybeThrows();
} catch (std::exception const& e) {
LOG4CPLUS_ERROR(logger, "MaybeThrow failed with:\n" << NestedExceptionPrinter(e));
}
◆ NestedExceptionPrinter() [1/2]
rtctk::componentFramework::NestedExceptionPrinter::NestedExceptionPrinter |
( |
std::exception const & |
exception | ) |
|
|
inlineexplicitnoexcept |
Construct from exception derived from std::exception.
◆ NestedExceptionPrinter() [2/2]
rtctk::componentFramework::NestedExceptionPrinter::NestedExceptionPrinter |
( |
std::exception_ptr |
ptr | ) |
|
|
inlineexplicitnoexcept |
Construct from exception_ptr.
◆ Str()
std::string rtctk::componentFramework::NestedExceptionPrinter::Str |
( |
| ) |
const |
|
inline |
Convenience function for constructing a std::string from the exception.
- Returns
- Formatted string
◆ operator<<
Formats exception from printer using PrintNestedExceptions.
- Parameters
-
os | output stream to output to. |
printer | Printer adapter to format. |
- Returns
- os
The documentation for this class was generated from the following file:
- componentFramework/services/common/src/include/rtctk/componentFramework/exceptions.hpp