]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/exceptions.h
Rework escape/pause menu (#5719)
[dragonfireclient.git] / src / exceptions.h
index 6bf832828a58bdc301f96f1197851a8021f91694..1b39c6725a7921a86f2cba8ccfc5b5707f864037 100644 (file)
@@ -27,10 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 class BaseException : public std::exception
 {
 public:
-       BaseException(const std::string &s) throw()
-       {
-               m_s = s;
-       }
+       BaseException(const std::string &s) throw(): m_s(s) {}
        ~BaseException() throw() {}
        virtual const char * what() const throw()
        {
@@ -65,6 +62,11 @@ class FileNotGoodException : public BaseException {
        FileNotGoodException(const std::string &s): BaseException(s) {}
 };
 
+class DatabaseException : public BaseException {
+public:
+       DatabaseException(const std::string &s): BaseException(s) {}
+};
+
 class SerializationError : public BaseException {
 public:
        SerializationError(const std::string &s): BaseException(s) {}
@@ -117,14 +119,20 @@ class ServerError : public BaseException {
 
 class ClientStateError : public BaseException {
 public:
-       ClientStateError(std::string s): BaseException(s) {}
+       ClientStateError(const std::string &s): BaseException(s) {}
 };
 
 class PrngException : public BaseException {
 public:
-       PrngException(std::string s): BaseException(s) {}
+       PrngException(const std::string &s): BaseException(s) {}
 };
 
+class ModError : public BaseException {
+public:
+       ModError(const std::string &s): BaseException(s) {}
+};
+
+
 /*
        Some "old-style" interrupts:
 */