user-facing exception class for hdtree
More...
#include <Exception.h>
|
| HDTreeException (const std::string &msg, const std::string &help="") noexcept |
| Create a new exception. More...
|
|
const char * | what () const noexcept |
| Override the message from the base class. More...
|
|
std::ostream & | stream (std::ostream &o) const noexcept |
| Stream the message of this exception into the input output stream. More...
|
|
|
std::string | message_ |
| the short message explaining the error
|
|
std::string | help_ |
| an optional, longer message providing help for the situation
|
|
user-facing exception class for hdtree
all of HDTree's C++ API exceptions are derived from this base exception and use the same API.
◆ HDTreeException()
hdtree::HDTreeException::HDTreeException |
( |
const std::string & |
msg, |
|
|
const std::string & |
help = "" |
|
) |
| |
|
noexcept |
Create a new exception.
- See also
- stream for how the message and help will be formatted.
- Parameters
-
[in] | msg | message of exception |
[in] | help | extra help information (optional) |
◆ stream()
std::ostream & hdtree::HDTreeException::stream |
( |
std::ostream & |
o | ) |
const |
|
noexcept |
Stream the message of this exception into the input output stream.
The output message looks like the following.
[HDTree]: <message>
Help: <help>
where the last line is only included if the help string is non-empty.
- Parameters
-
[in] | o | output stream to write to |
- Returns
- modified output stream
◆ what()
const char * hdtree::HDTreeException::what |
( |
| ) |
const |
|
noexcept |
Override the message from the base class.
- Returns
- C-style string with message
The documentation for this class was generated from the following files: