Class ErrorHandler
Defined in File errorHandler.h
Inheritance Relationships
Base Type
public std::exception
Derived Types
public CannotCreateDirectoryError
(Class CannotCreateDirectoryError)public CannotOpenFileError
(Class CannotOpenFileError)public CommandArgumentException
(Class CommandArgumentException)public FileContentError
(Class FileContentError)public FileFormatError
(Class FileFormatError)public FileNotFoundError
(Class FileNotFoundError)public InternalError
(Class InternalError)
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.
-
inline explicit ErrorHandler(const std::string &message)