Class Exception

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public std::exception

Class Documentation

class Exception : public std::exception

Custom exception class to represent errors specific to this application.

This class extends the standard exception class and is designed to encapsulate error codes and messages specific to this application’s context.

Public Functions

inline explicit Exception(Status code, const char *fmt = nullptr, ...)

Constructs an exception with a status code and a formatted message.

Parameters:
  • code – The error status code.

  • fmt – The format string for the error message.

  • ... – The format arguments.

inline Status code() const

Retrieves the status code of the exception.

Returns:

The error status code.

inline const char *msg() const

Retrieves the message of the exception.

Returns:

The error message.

inline const char *what() const noexcept override

Retrieves the exception message.

This function overrides the standard exception’s what() method.

Returns:

The error message.