]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Error.hh
bugfix: resource file searching was broken
[chaz/yoink] / src / Moof / Error.hh
index 78c894f3178f4583fde3ccb47583be9c08070573..494dd60f8cf925c65f38ed8762e1218d31632980 100644 (file)
@@ -30,8 +30,8 @@ public:
                NONE = 0,                                       // -
                ALC_INIT,                                       // description
                FASTEVENTS_INIT,                        // description
-               OPENAL_INIT,                            // description
                FILE_NOT_FOUND,                         // path of missing file
+               OPENAL_INIT,                            // description
                RESOURCE_NOT_FOUND,                     // name of missing resource
                SCRIPT_ERROR,                           // description
                SDL_INIT,                                       // description
@@ -46,10 +46,10 @@ public:
        }
        virtual ~Error() throw() {}
 
-       void init(unsigned code, const std::string& what = "")
+       void init(unsigned code = NONE, const std::string& what = "")
        {
-               mWhat[sizeof(mWhat)-1] = '\0';
                strncpy(mWhat, what.c_str(), sizeof(mWhat)-1);
+               mWhat[sizeof(mWhat)-1] = '\0';
                mCode = code;
        }
 
This page took 0.018944 seconds and 4 git commands to generate.