Skip to navigation

holoscan::make_error

Beta
View as Markdown
Error holoscan::make_error(
const RuntimeError &error
)

Build an Error value from a RuntimeError (the reverse of RuntimeError(const Error&)).

The code is taken from error.code(). The message is recovered from what() with the generated <code name>: prefix stripped, so round-tripping (Error -> RuntimeError -> Error) does not duplicate the prefix; a code-only RuntimeError maps to an empty message. A message that does not carry the generated prefix (e.g. from an inherited std::runtime_error constructor) is kept verbatim.

Returns: The equivalent Error value.

Parameters

error
const RuntimeError &

The runtime error to convert.