Main Page   File List   File Members   Related Pages  

frdi_exception.h File Reference

function headers for frdi_exception.c More...

Go to the source code of this file.

Defines

#define frdiExceptionArrive(frdi_exception_arg)   setjmp((frdi_exception_arg)->location)
#define frdiExceptionLeave(frdi_exception_arg, frdi_status_arg)   longjmp((frdi_exception_arg)->location, frdi_status_arg)

Functions

char * frdiStrCpy (frdi_exception *eh, char *in)
void frdiExceptionDebug2 (char *filename, int linenum, char *str)
void frdiExceptionDebug (char *str)
int frdiExceptionReport (frdi_exception *exception)
void frdiExceptionThrow (frdi_exception *exception, int err_num, char *message)
frdi_dict * frdiExceptionLookupEnglish ()
frdi_exception * frdiExceptionNew ()
void frdiExceptionFree (frdi_exception *exception)


Detailed Description

function headers for frdi_exception.c

Author:
Douglas Reay <douglas-legal@reay.org>
Warning:

Define Documentation

#define frdiExceptionArrive (  frdi_exception_arg    )     setjmp((frdi_exception_arg)->location)
 

say that this is where to come back to in the event of an error

#define frdiExceptionLeave (  frdi_exception_arg,
frdi_status_arg    )     longjmp((frdi_exception_arg)->location, frdi_status_arg)
 

Help! We have encountered an error. Run away! NOTE: this should only be called from or beneath a function that has called Arrive


Function Documentation

char* frdiStrCpy (  frdi_exception *    eh,
char *    in
) 
 

Copy a string into a newly memory allocated string

void frdiExceptionDebug2 (  char *    filename,
int    linenum,
char *    str
) 
 

send the debug information somewhere appropriate

void frdiExceptionDebug (  char *    str ) 
 

send the debug information somewhere appropriate

Todo:
incorporate s __FILE__ and d __LINE__ (via a macro?) consider also a va args version

int frdiExceptionReport (  frdi_exception *    exception ) 
 

report an exception. Options are: print it to stderr, log it go to a handler (takes an exception * as void *, returns an int as void *) re-throw to a parent exception Returns an error code

void frdiExceptionThrow (  frdi_exception *    exception,
int    err_num,
char *    message
) 
 

What to use if you have a problem

frdi_dict* frdiExceptionLookupEnglish (    ) 
 

lookup from error number to english word

frdi_exception* frdiExceptionNew (    ) 
 

create an exception handler

void frdiExceptionFree (  frdi_exception *    exception ) 
 

release the object


Generated on Wed Aug 18 13:23:56 2004 for Project Fairdice by doxygen1.2.18