Exception#

Fully qualified name: cupva::Exception

Defined in src/host/shared/include/install/cupva_host_common.hpp

class Exception : public std::exception#

Exception is used for error-handling.

  • Maturity: GA

Public Functions

Exception(
Error const errorCode,
char_t const *const errorMsg,
) noexcept#

Constructs new exception object.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Parameters:
  • errorCode – code indicating error condition

  • errorMsg – string containing error detailed message

Pre:

None

~Exception() noexcept override#

Destroy Exception object.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: No

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Pre:

None

Exception(Exception const&) noexcept#

Copy constructor.

Exception &operator=(Exception const&) & noexcept#

Copy assignment.

Exception(Exception&&) noexcept#

Move constructor.

Exception &operator=(Exception&&) & noexcept#

Move assignment.

Error getErrorCode() const noexcept#

Return the error code carried by this exception object.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Returns:

The error code provided to the constructor.

Pre:

None

char_t const *what() const noexcept override#

Get Error Message.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Returns:

The error message associated with this exception object.

Pre:

None

Public Static Attributes

static constexpr uint32_t MAX_ERROR_MSG_LENGTH = {768U}#

Maximum length of the error message