#include <cstring>
#include <exception>
+#include <string>
#include <Moof/Math.hh>
{
public:
- explicit Exception(unsigned code, const char* what = "")
+ explicit Exception(unsigned code, const std::string& what = "")
{
mWhat[sizeof(mWhat)-1] = '\0';
- strncpy(mWhat, what, sizeof(mWhat)-1);
+ strncpy(mWhat, what.c_str(), sizeof(mWhat)-1);
mCode = code;
}
virtual ~Exception() throw() {}
enum Code
{
NONE = 0,
+ ALC_INIT, // description
FASTEVENTS_INIT, // description
FILE_NOT_FOUND, // path of missing file
RESOURCE_NOT_FOUND, // name of missing resource
SCRIPT_ERROR, // description
SDL_INIT, // description
SDL_VIDEOMODE, // -
- UNKNOWN_AUDIO_FORMAT, // -
- UNKNOWN_IMAGE_FORMAT, // -
+ UNKNOWN_AUDIO_FORMAT, // name of resource
+ UNKNOWN_IMAGE_FORMAT, // name of resource
};
} // namespace ErrorCode