Bomberman
Error.hpp
Go to the documentation of this file.
1 //
2 // Created by hbenjamin on 11/06/2021.
3 //
4 
5 #pragma once
6 
7 #include <exception>
8 #include <stdexcept>
9 #include <string>
10 
11 namespace BBM {
12  class Error : public std::runtime_error
13  {
14  public:
16  explicit Error(const std::string &what);
18  Error(const Error &) = default;
20  ~Error() override = default;
22  Error &operator=(const Error &) = default;
23  };
24 
25  class ParserError : public Error
26  {
27  public:
29  explicit ParserError(const std::string &what);
31  ParserError(const ParserError &) = default;
33  ~ParserError() override = default;
35  ParserError &operator=(const ParserError &) = default;
36  };
37 }
BBM
Definition: AnimationsComponent.cpp:9
BBM::Error
Definition: Error.hpp:12
BBM::ParserError::operator=
ParserError & operator=(const ParserError &)=default
A default assignment operator.
BBM::Error::~Error
~Error() override=default
A default destructor.
BBM::ParserError::~ParserError
~ParserError() override=default
A default destructor.
BBM::Error::operator=
Error & operator=(const Error &)=default
A default assignment operator.
BBM::Error::Error
Error(const std::string &what)
Create a new exception.
Definition: Error.cpp:9
BBM::ParserError
Definition: Error.hpp:25
BBM::ParserError::ParserError
ParserError(const std::string &what)
Create a new parser exception.
Definition: Error.cpp:13