]>
Dogcows Code - chaz/yoink/blob - src/ErrorHandler.cc
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
10 **************************************************************************/
14 #include "ErrorHandler.hh"
17 std::string
getErrorString(const Mf::Error
& error
)
23 case Mf::Error::ALC_INIT
:
24 str
+= "An error occurred during OpenAL initialization: ";
28 case Mf::Error::FASTEVENTS_INIT
:
29 case Mf::Error::SDL_INIT
:
30 str
+= "An error occurred during SDL initialization: ";
34 case Mf::Error::FILE_NOT_FOUND
:
35 str
+= "A required file (";
37 str
+= ") could not be found.";
40 case Mf::Error::OPENAL_INIT
:
41 str
+= "The audio library returned an error: ";
45 case Mf::Error::RESOURCE_NOT_FOUND
:
46 str
+= "A required resource (";
48 str
+= ") could not be found.";
51 case Mf::Error::SCRIPT_ERROR
:
52 str
+= "An error occurred in a script: ";
56 case Mf::Error::SDL_VIDEOMODE
:
57 str
+= "An error occurred while trying to set up the graphics.";
60 case Mf::Error::UNKNOWN_AUDIO_FORMAT
:
61 str
+= "An error occurred while trying to load an audio file, ";
66 case Mf::Error::UNKNOWN_IMAGE_FORMAT
:
67 str
+= "An error occurred while trying to load an image file, ";
73 std::ostringstream stream
;
74 stream
<< "An unknown error (code " << error
.code() << ") occurred.";
This page took 0.035388 seconds and 4 git commands to generate.