]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Error.hh
library class revamped as manager, goodbye tilemap
[chaz/yoink] / src / Moof / Error.hh
index 05c637705a96d77c91169803e41ae4b1b7f8f6fc..c452ae6df836f8351660b5cd0e460239f1932697 100644 (file)
@@ -57,7 +57,7 @@ public:
                UNKNOWN_IMAGE_FORMAT,           // name of resource
        };
 
-       explicit Error(unsigned code, const std::string& what = "")
+       explicit Error(unsigned code = NONE, const std::string& what = "")
        {
                init(code, what);
        }
@@ -70,7 +70,7 @@ public:
                mCode = code;
        }
 
-       virtual void raise()
+       virtual void raise() const
        {
                throw *this;
        }
@@ -85,8 +85,9 @@ public:
                return mWhat;
        }
 
-       bool isError() const throw()
+       operator bool () const
        {
+               // resolves to true if error code is not NONE
                return mCode != NONE;
        }
 
This page took 0.018195 seconds and 4 git commands to generate.