optris::sdk::BadResultAccess
Thrown by Expected::value() when there is no value.
std::expected throws std::bad_expected_access<E> here, which is C++23 and so not available. Nothing in this repository calls value() on an error -- every site branches on operator bool first -- so this is the diagnostic for a mistake rather than a control-flow path, which is why it carries the error's message when the error type has one: an exception that says only "there
was no value" sends the reader to the wrong place.
Inherits from std::logic_error.
Public functions
BadResultAccess
BadResultAccess(const std::string &what)
Parameters
| Name | Description |
|---|---|
what |
The message, which carries the error's own message when the error type has one. |