We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0880371 commit fef97f8Copy full SHA for fef97f8
src/Exception.h
@@ -2,21 +2,20 @@
2
#define _EXCEPTION_H
3
4
#include <string>
5
+#include <exception>
6
7
namespace chesspp
8
{
- class exception
9
- {
10
- protected:
11
- exception &operator=(const exception &) throw();
12
-
+ class exception : public std::exception
+ {
13
public:
14
exception() throw() {}
15
- exception(const std::string &_e) throw() : e(_e) {}
16
- exception(const exception &) throw() {}
17
virtual ~exception() throw() {};
+ exception(const exception &) throw() {}
18
19
- virtual std::string what() const throw() {return e;}
+ exception(const std::string &_e) throw() : e(_e) {}
+ virtual const char *what() { return e.c_str(); }
+
20
private:
21
std::string e;
22
};
0 commit comments