Class Status - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
inline explicit Status(IError const &ie)#

Constructs a new Status object from an existing IError reference.

Parameters:

ie – Reference to an error or success state

inline explicit Status(IError &&ie)#

Constructs a new Status object from an IError rvalue reference.

Parameters:

ie – Rvalue reference to an error or success state

inline explicit Status(IError const &ie, StringView msg)#

Constructs a new Status object from an IError reference with extra text.

Parameters:
  • ie – Reference to an error or success state

  • msg – Additional message appended to the error description

Status() = default#
~Status() = default#
Status(const Status&) = default#
Status &operator=(const Status&) = default#
inline bool operator==(const Status &other) const#

Checks if two Status objects have the same error code.

Parameters:

other – Another Status to compare with

Returns:

true if codes match, false otherwise

bool operator!=(const Status &other) const#

Checks if two Status objects do not have the same error code.

Parameters:

other – Another Status to compare with

Returns:

true if codes differ, false otherwise

inline bool ok() const#

Indicates if the Status is error-free (ok).

Returns:

true if no error is present, false otherwise

inline String message() const#
inline Uint64 code() const#

Returns encoded error code.

Returns:

Uint64 encoded error code

inline bool update(IError &ie, const String &msg)#

Update the error code and message only if there was no error earlier.

This is done to preserve the very first error that happens

Parameters:
  • ie – IError interface from any component

  • msg – Additional message to be added to the error message

Returns:

true if the update was successful, false otherwise

inline bool update(const Status &s)#

Update the error code and message only if there was no error earlier.

This is done to preserve the very first error that happens

Parameters:

s – New Status to be updated

Returns:

true if the update was successful, false otherwise