holoscan::make_error
holoscan::make_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
The runtime error to convert.