allegro_error - Man Page

Stores the last Allegro error message.

Synopsis

#include <allegro.h>

extern char allegro_error[ALLEGRO_ERROR_SIZE];

Description

Text string used by set_gfx_mode(), install_sound() and other functions to report error messages. If they fail and you want to tell the user why, this is the place to look for a description of the problem. Example:

   void abort_on_error(const char *message)
   {
      if (screen != NULL)
         set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
   
      allegro_message("%s.\nLast Allegro error `%s'\n",
                      message, allegro_error);
      exit(-1);
   }
   ...
      if (some_allegro_function() == ERROR_CODE)
         abort_on_error("Error calling some function!");

See Also

set_gfx_mode(3), install_sound(3)

Referenced By

ex12bit(3), ex3buf(3), ex3d(3), exaccel(3), exalpha(3), exbitmap(3), exblend(3), excamera(3), excolmap(3), excustom(3), exdata(3), exdbuf(3), exexedat(3), exflame(3), exflip(3), exfont(3), exgui(3), exhello(3), exjoy(3), exkeys(3), exlights(3), exmem(3), exmidi(3), exmouse(3), expackf(3), expal(3), expat(3), exquat(3), exrgbhsv(3), exsample(3), exscale(3), exscn3d(3), exshade(3), exspline(3), exsprite(3), exstars(3), exstream(3), exswitch(3), exsyscur(3), extimer(3), extrans(3), extrans2(3), exunicod(3), exupdate(3), exxfade(3), exzbuf(3), install_sound(3), set_gfx_mode(3), ustrerror(3).

version 4.4.3 Allegro manual