error.h File Reference


Variables

void(* warning )(const char *,...)
void(* error )(const char *,...)
void(* fatal )(const char *,...)

Detailed Description

Functions to report errors and possibly kill the program. You can change these pointers from their default values so that fltk calls your code instead.

Variable Documentation

void(* error)(const char *format,...)
 

fltk will call this when it wants to report a recoverable problem. but in this case the display is so messed up it is unlikely the user can continue. Very little calls this now. The default version on Unix prints a message to stderr, on Windows it pops up a MessageBox, and then both versions call exit(1).

You may be able to use longjmp or an exception to get back to your own code.

void(* fatal)(const char *format,...)
 

fltk will call this when it wants to report a problem that it cannot recover from. You must not make any fltk calls again. The default version is the same function as error().

void(* warning)(const char *format,...)
 

fltk will call this when it wants to report a recoverable problem. The display may be messed up but the user can probably keep working. (all X protocol errors call this). The default version on Unix prints a message to stderr, on Windows it pops up a MessageBox.


Sun Jan 7 00:55:16 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.