PageRenderTime 122ms CodeModel.GetById 48ms app.highlight 2ms RepoModel.GetById 59ms app.codeStats 0ms

/src/utils/error.h

http://rowgage.googlecode.com/
C++ Header | 70 lines | 38 code | 11 blank | 21 comment | 0 complexity | fdb7b4157a6e775633a504ed8b843ffa MD5 | raw file
 1/*
 2 * error.h
 3 *
 4 * This file contains the error message strings for all of the framework's
 5 * possible errors which need to be displayed. They are separated by module and
 6 * allow the error messages to be selected based on language (as the original
 7 * author of this package only knows English, this functionality is available
 8 * but unused.
 9 */
10
11#ifndef ROWGAGE_ERROR_H_
12#define ROWGAGE_ERROR_H_
13
14#include <stdlib.h>
15
16#define printerr(...) fprintf(stderr, __VA_ARGS__)
17
18/* Define our available languages */
19#define LANGUAGE_ENGLISH 1
20
21/* Defaults to English if ROWGAGE_LANGUAGE is not set */
22#ifndef ROWGAGE_LANGUAGE
23#define ROWGAGE_LANGUAGE LANGUAGE_ENGLIGH
24#endif
25
26/*
27#if ROWGAGE_LANGUAGE == LANGUAGE_ENGLISH
28*/
29
30/* Controller-related error messages */
31#define ERROR_CONT_ACTIONCREATE "ERROR: Attempted to create action from non-existant event or listener!\n"
32#define ERROR_CONT_EVENTCREATE "ERROR: Failed to create event!\n"
33#define ERROR_CONT_EVENTTCREATE "ERROR: Failed to create event type!\n"
34/* Controller-related warning messages */
35#define WARNING_CONT_NOSUCHACTION "WARNING: Attempted to activate a non-existant action!\n"
36#define WARNING_CONT_REINIT "WARNING: Attempted to create controller when already initialized!\n"
37#define WARNING_CONT_FREE "WARNING: Attempted to free controller before it was initialized!\n"
38#define WARNING_CONT_ADD "WARNING: Attempted to add to controller before it was initialized!\n"
39#define WARNING_CONT_INIT "WARNING: Controller not initialized!\n"
40#define WARNING_CONT_EVENTFREE "WARNING: Attempted to free non-existant event!\n"
41#define WARNING_CONT_LISTREG "WARNING: Attempted to register non-existant listener!\n"
42#define WARNING_CONT_LISTFREE "WARNING: Attempted to free non-existant listener!\n"
43#define WARNING_CONT_NOSUCHLIST "WARNING: Attempted to trigger non-existant listener!\n"
44#define WARNING_CONT_TREINIT "WARNING: Attempted to create timed controller when already initialized!\n"
45#define WARNING_CONT_TFREE "WARNING: Attempted to free timed controller before it was initialized!\n"
46#define WARNING_CONT_TADD "WARNING: Attempted to add to timed controller before it was initialized!\n"
47
48/* GUI-related error messages */
49#define ERROR_GUI_NOTEXTURE "ERROR: Failed to draw texture, texture not found!\n"
50#define ERROR_GUI_NOTEXINIT "ERROR: Failed to draw texture, texture list not initialized!\n"
51/* GUI-related warning messages */
52#define WARNING_GUI_REINITTEX "WARNING: Attempted to re-initialize stored texture information!\n"
53#define WARNING_GUI_REINIT "WARNING: Attempted to re-initialize GUI!\n"
54#define WARNING_GUI_CLOSE "WARNING: Attempted to close GUI before initializing!\n"
55
56/* Lua-related error messages */
57#define ERROR_LUA_OPENFAIL "ERROR: Failed to open script: %s\n"
58#define ERROR_LUA_INITFAIL "ERROR: Lua script failed to initialize: %s\n"
59#define ERROR_LUA_SCRIPTFAIL "ERROR: Lua script failed: %s\n"
60#define ERROR_LUA_NOINIT "ERROR: Lua script uninitialized!\n"
61#define ERROR_LUA_PKGNOINIT "ERROR: Attempted to create new package before Lua state was initialized!\n"
62#define ERROR_LUA_ADDPKGINIT "ERROR: Attempted to add to a package before Lua state was initialized!\n"
63#define ERROR_LUA_SETPKGINIT "ERROR: Attempted to set a package before Lua state was initialized!\n"
64/* Lua-related warning messages */
65#define WARNING_LUA_REINIT "WARNING: Attempted to re-initialize Lua state!\n"
66#define WARNING_LUA_CLOSE "WARNING: Attempted to close Lua state before initializing!\n"
67
68/*#endif * ROWGAGE_LANGUAGE == ... */
69
70#endif