Safety Error State#

class SafetyErrorState#

Owns or borrows a runtime recorder and retains the first terminal failure after recorder diagnostics are cleared.

Public Functions

inline SafetyErrorState() noexcept#

Construct the runtime-owned state and its per-runtime recorder.

inline explicit SafetyErrorState(
nvinfer2::safe::ISafeRecorder &recorder
) noexcept#

Construct state around a recorder whose lifetime is managed by the caller.

SafetyErrorState(SafetyErrorState const&) = delete#
SafetyErrorState &operator=(SafetyErrorState const&) = delete#
inline bool fatal() const noexcept#
inline SafetyStatus status() const noexcept#
inline void setFatal(SafetyStatus const &status) noexcept#
inline nvinfer2::safe::ISafeRecorder &recorder() noexcept#
inline bool observe() noexcept#
inline SafetyStatus reject(
SafetyStatusCode code,
char const *message
) noexcept#
inline bool updateStatus(
SafetyStatus const &status,
nvinfer2::safe::ErrorCode code
) noexcept#
inline SafetyStatus propagateFailure(
SafetyStatus const &status,
nvinfer2::safe::ErrorCode code
) noexcept#

Backend failures are terminal at the owning layer; keep their original category and diagnostics.

inline SafetyStatus fail(
nvinfer2::safe::ErrorCode code,
char const *message
) noexcept#
inline SafetyStatus fail(
nvinfer2::safe::ErrorCode code,
std::string_view context,
char const *detail
) noexcept#