Class ErrorHandler

Inheritance Relationships

Base Type

  • public std::exception

Derived Types

Class Documentation

class ErrorHandler : public std::exception

Base class for handling exceptions with custom messages.

ErrorHandler extends the standard std::exception class to allow for exceptions that carry custom messages. These messages are passed during construction and retrieved via the what() method.

Subclassed by CannotCreateDirectoryError, CannotOpenFileError, CommandArgumentException, FileContentError, FileFormatError, FileNotFoundError, InternalError

Public Functions

inline explicit ErrorHandler(const std::string &message)

Constructs an ErrorHandler with a custom message.

Parameters:

message – The message detailing the cause of the exception.

inline const char *what() const noexcept override

Returns the message associated with the exception.

Returns:

The message for the exception.