AngouriMath
AmgouriMathException.h
1 #pragma once
2 
3 #include <exception>
4 #include "ErrorCode.h"
5 
6 namespace AngouriMath
7 {
8  class AngouriMathException : public std::exception
9  {
10  public:
12  : error(e) { }
13 
14  virtual const char* what() const noexcept override
15  {
16  return this->Name().c_str();
17  }
18 
19  const std::string& Name() const
20  {
21  return this->error.Name();
22  }
23 
24  const std::string& Message() const
25  {
26  return this->error.Message();
27  }
28 
29  const std::string& StackTrace() const
30  {
31  return this->error.StackTrace();
32  }
33 
34  private:
35  ErrorCode error;
36  };
37 }
Definition: ErrorCode.h:8
Definition: AmgouriMathException.h:8