Base class for every typed exception thrown by the Lucid engine.
Derives from std::exception so generic handlers
(catch (const std::exception&)) still observe the formatted message via
what. Concrete subclasses are expected to populate the
inherited msg_ field after their member fields are initialised, allowing
the formatted text to reference moved-from constructor arguments through
member accessors.
Pybind11 maps this class to lucid._C.engine.LucidError, which is a
Python subclass of RuntimeError. All derived exception classes are
further re-exported as Python subclasses of LucidError by
bind_errors.cpp.
See Also
ErrorBuilder : Fluent helper that throws typed subclasses with a
consistent "op: msg [trace=...]" format.
Parameters
msgstd::stringAttributes
msg_std::stringwhat() payload. Protected so subclasses can overwrite it after their members are initialised.Examples
`
throw LucidError("unexpected null tensor in saved-graph slot");
`Constructors
1LucidError
void LucidError(int msg)Constructs the base exception with a pre-formatted message.
Parameters
msgstd::stringwhat. Move-stored into msg_.