X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fexceptions.h;h=1b39c6725a7921a86f2cba8ccfc5b5707f864037;hb=0e0c824ea75a812a99c7d329c3a4862d6beadf3b;hp=abd8c68ae31ee9b0917eb8fd529e6b826a425f16;hpb=25945dc5395a03cab069ff0e6470ba8d59b03978;p=dragonfireclient.git diff --git a/src/exceptions.h b/src/exceptions.h index abd8c68ae..1b39c6725 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -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,11 +62,21 @@ 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) {} }; +class PacketError : public BaseException { +public: + PacketError(const std::string &s): BaseException(s) {} +}; + class LoadError : public BaseException { public: LoadError(const std::string &s): BaseException(s) {} @@ -110,17 +117,22 @@ class ServerError : public BaseException { ServerError(const std::string &s): BaseException(s) {} }; -// Only used on Windows (SEH) -class FatalSystemException : public BaseException { +class ClientStateError : public BaseException { public: - FatalSystemException(const std::string &s): BaseException(s) {} + ClientStateError(const std::string &s): BaseException(s) {} }; -class ClientStateError : public BaseException { +class PrngException : public BaseException { public: - ClientStateError(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: */