|
RTC Toolkit 5.1.0
|
Adapter object intended to be used in contexts without direct access to the output-stream object. More...
#include <rtctk/componentFramework/exceptions.hpp>
Public Member Functions | |
| NestedExceptionPrinter (const std::exception &exception) noexcept | |
| Construct from exception derived from std::exception. | |
| NestedExceptionPrinter (std::exception_ptr ptr) noexcept | |
| Construct from exception_ptr. | |
| std::string | Str () const |
| Convenience function for constructing a std::string from the exception. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const NestedExceptionPrinter &printer) |
| Formats exception from printer using PrintNestedExceptions. | |
Adapter object intended to be used in contexts without direct access to the output-stream object.
try {
MaybeThrows();
} catch (const std::exception& e) {
LOG4CPLUS_ERROR(logger, "MaybeThrow failed with:\n" << NestedExceptionPrinter(e));
}
|
inlineexplicitnoexcept |
Construct from exception derived from std::exception.
|
inlineexplicitnoexcept |
Construct from exception_ptr.
|
inline |
Convenience function for constructing a std::string from the exception.
|
friend |
Formats exception from printer using PrintNestedExceptions.
| os | output stream to output to. |
| printer | Printer adapter to format. |