R-Type  1.0.0
R-Type Project from Epitech
Exceptions.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** Exceptions
4 ** File description:
5 ** Exceptions
6 */
7 
8 #pragma once
9 
10 #include <exception>
11 #include <string>
12 
17 class Exceptions : public std::exception {
18  public:
24  {
25  }
31  Exceptions(std::string msg) : _message(msg)
32  {
33  }
39  {
40  }
46  const char *what() const throw()
47  {
48  return _message.c_str();
49  }
50 
51  protected:
52  private:
57  std::string _message;
58 };
Exceptions
Exceptions class.
Definition: Exceptions.hpp:17
Exceptions::Exceptions
Exceptions()
Construct a new Exceptions object.
Definition: Exceptions.hpp:23
Exceptions::~Exceptions
~Exceptions()
Destroy the Exceptions object.
Definition: Exceptions.hpp:38
Exceptions::Exceptions
Exceptions(std::string msg)
Construct a new Exceptions object.
Definition: Exceptions.hpp:31
Exceptions::what
const char * what() const
Get the message to throw.
Definition: Exceptions.hpp:46