My Project
Errors.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4 ** File description:
5 ** Errors
6 */
7 
8 #ifndef ERRORS_HPP_
9  #define ERRORS_HPP_
10 
11  #include <exception>
12  #include <iostream>
13  #include <string>
14 
18 namespace Error {
22  class Errors : public std::exception
23  {
24  public:
30  Errors(std::string const &message) throw();
31 
35  virtual ~Errors() throw();
36 
42  const char *what() const throw();
43 
44  private:
45  std::string _message;
46  };
47 }
48 
49 #endif /* !ERRORS_HPP_ */
Error
Error namespace that will contain all Error types.
Definition: Errors.hpp:18
Error::Errors
Erorr class to handle throw.
Definition: Errors.hpp:22
Error::Errors::what
const char * what() const
Define the message error object.
Definition: Errors.cpp:18
Error::Errors::Errors
Errors(std::string const &message)
Construct a new Errors object.
Definition: Errors.cpp:10
Error::Errors::~Errors
virtual ~Errors()
Destroy the Errors object.
Definition: Errors.cpp:14