TErrorInfo

primo::avblocks::modern::TErrorInfo

class TErrorInfo

Copy of the error information reported by AVBlocks: facility, code, message and hint.

The strings are copied out of the source primo::error::ErrorInfo, so a TErrorInfo stays valid after the source object is gone. A default-constructed TErrorInfo is empty.

Public Functions

TErrorInfo() = default

Creates an empty error info: zero facility and code, empty message and hint.

inline explicit TErrorInfo(const primo::error::ErrorInfo *error)

Copies the error information from error.

Parameters:

error – The error to copy. If nullptr the result is an empty error info.

inline int32_t facility() const

Returns the error facility, i.e. the component that reports the error.

inline int32_t code() const

Returns the error code. Its meaning depends on the facility.

inline const std::string &message() const

Returns the error message, a textual representation of the error code. Empty if not set.

inline const std::string &hint() const

Returns a diagnostic hint, suitable for error logs and debugging. Empty if not set.