PageRenderTime 74ms CodeModel.GetById 23ms RepoModel.GetById 1ms 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
Possible License(s): GPL-2.0
  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. #ifndef ROWGAGE_ERROR_H_
  11. #define ROWGAGE_ERROR_H_
  12. #include <stdlib.h>
  13. #define printerr(...) fprintf(stderr, __VA_ARGS__)
  14. /* Define our available languages */
  15. #define LANGUAGE_ENGLISH 1
  16. /* Defaults to English if ROWGAGE_LANGUAGE is not set */
  17. #ifndef ROWGAGE_LANGUAGE
  18. #define ROWGAGE_LANGUAGE LANGUAGE_ENGLIGH
  19. #endif
  20. /*
  21. #if ROWGAGE_LANGUAGE == LANGUAGE_ENGLISH
  22. */
  23. /* Controller-related error messages */
  24. #define ERROR_CONT_ACTIONCREATE "ERROR: Attempted to create action from non-existant event or listener!\n"
  25. #define ERROR_CONT_EVENTCREATE "ERROR: Failed to create event!\n"
  26. #define ERROR_CONT_EVENTTCREATE "ERROR: Failed to create event type!\n"
  27. /* Controller-related warning messages */
  28. #define WARNING_CONT_NOSUCHACTION "WARNING: Attempted to activate a non-existant action!\n"
  29. #define WARNING_CONT_REINIT "WARNING: Attempted to create controller when already initialized!\n"
  30. #define WARNING_CONT_FREE "WARNING: Attempted to free controller before it was initialized!\n"
  31. #define WARNING_CONT_ADD "WARNING: Attempted to add to controller before it was initialized!\n"
  32. #define WARNING_CONT_INIT "WARNING: Controller not initialized!\n"
  33. #define WARNING_CONT_EVENTFREE "WARNING: Attempted to free non-existant event!\n"
  34. #define WARNING_CONT_LISTREG "WARNING: Attempted to register non-existant listener!\n"
  35. #define WARNING_CONT_LISTFREE "WARNING: Attempted to free non-existant listener!\n"
  36. #define WARNING_CONT_NOSUCHLIST "WARNING: Attempted to trigger non-existant listener!\n"
  37. #define WARNING_CONT_TREINIT "WARNING: Attempted to create timed controller when already initialized!\n"
  38. #define WARNING_CONT_TFREE "WARNING: Attempted to free timed controller before it was initialized!\n"
  39. #define WARNING_CONT_TADD "WARNING: Attempted to add to timed controller before it was initialized!\n"
  40. /* GUI-related error messages */
  41. #define ERROR_GUI_NOTEXTURE "ERROR: Failed to draw texture, texture not found!\n"
  42. #define ERROR_GUI_NOTEXINIT "ERROR: Failed to draw texture, texture list not initialized!\n"
  43. /* GUI-related warning messages */
  44. #define WARNING_GUI_REINITTEX "WARNING: Attempted to re-initialize stored texture information!\n"
  45. #define WARNING_GUI_REINIT "WARNING: Attempted to re-initialize GUI!\n"
  46. #define WARNING_GUI_CLOSE "WARNING: Attempted to close GUI before initializing!\n"
  47. /* Lua-related error messages */
  48. #define ERROR_LUA_OPENFAIL "ERROR: Failed to open script: %s\n"
  49. #define ERROR_LUA_INITFAIL "ERROR: Lua script failed to initialize: %s\n"
  50. #define ERROR_LUA_SCRIPTFAIL "ERROR: Lua script failed: %s\n"
  51. #define ERROR_LUA_NOINIT "ERROR: Lua script uninitialized!\n"
  52. #define ERROR_LUA_PKGNOINIT "ERROR: Attempted to create new package before Lua state was initialized!\n"
  53. #define ERROR_LUA_ADDPKGINIT "ERROR: Attempted to add to a package before Lua state was initialized!\n"
  54. #define ERROR_LUA_SETPKGINIT "ERROR: Attempted to set a package before Lua state was initialized!\n"
  55. /* Lua-related warning messages */
  56. #define WARNING_LUA_REINIT "WARNING: Attempted to re-initialize Lua state!\n"
  57. #define WARNING_LUA_CLOSE "WARNING: Attempted to close Lua state before initializing!\n"
  58. /*#endif * ROWGAGE_LANGUAGE == ... */
  59. #endif