X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FError.hh;h=494dd60f8cf925c65f38ed8762e1218d31632980;hp=78c894f3178f4583fde3ccb47583be9c08070573;hb=90b2c7fb10b244b781b84965a0d36f1f323ee94d;hpb=8148b51f1bec8f662672d3ca36eea1784991e5cc diff --git a/src/Moof/Error.hh b/src/Moof/Error.hh index 78c894f..494dd60 100644 --- a/src/Moof/Error.hh +++ b/src/Moof/Error.hh @@ -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; }