Arcade architecture
Exception.hpp
Go to the documentation of this file.
1
10/*
11** EPITECH PROJECT, 2025
12** barcade
13** File description:
14** Exception
15*/
16
17#ifndef Exception_HPP_
18#define Exception_HPP_
19#include <exception>
20#include <string>
21
29class DllException : public std::exception {
30 private:
31 std::string _msg;
32
33 public:
38 const char *what() const noexcept override { return this->_msg.c_str(); }
43 DllException(const std::string &msg) : _msg(msg) {}
47 ~DllException() = default;
48};
49
57class DisplayModuleException : public std::exception {
58 private:
59 std::string _msg;
60
61 public:
66 const char *what() const noexcept override { return this->_msg.c_str(); }
71 DisplayModuleException(const std::string &msg) : _msg(msg) {}
76};
77
85class ProgramCoreException : public std::exception {
86 private:
87 std::string _msg;
88
89 public:
94 const char *what() const noexcept override { return this->_msg.c_str(); }
99 ProgramCoreException(const std::string &msg) : _msg(msg) {}
104};
105
106#endif /* !Exception_HPP_ */
Exception class for handling DLL-related errors.
Definition: Exception.hpp:57
DisplayModuleException(const std::string &msg)
Constructor for DisplayModuleException.
Definition: Exception.hpp:71
std::string _msg
Error message.
Definition: Exception.hpp:59
~DisplayModuleException()=default
Destructor for DisplayModuleException.
const char * what() const noexcept override
Returns the error message.
Definition: Exception.hpp:66
Exception class for handling DLL-related errors.
Definition: Exception.hpp:29
DllException(const std::string &msg)
Constructor for DllException.
Definition: Exception.hpp:43
std::string _msg
Error message.
Definition: Exception.hpp:31
~DllException()=default
Destructor for DllException.
const char * what() const noexcept override
Returns the error message.
Definition: Exception.hpp:38
Exception class for handling DLL-related errors.
Definition: Exception.hpp:85
ProgramCoreException(const std::string &msg)
Constructor for ProgramCoreException.
Definition: Exception.hpp:99
std::string _msg
Error message.
Definition: Exception.hpp:87
~ProgramCoreException()=default
Destructor for ProgramCoreException.
const char * what() const noexcept override
Returns the error message.
Definition: Exception.hpp:94