Main Page | Data Structures | File List | Globals

libgu/gu_exceptions.c File Reference

Exception Handling. More...

#include "before_system.h"
#include <stdlib.h>
#include "gu.h"

Defines

#define GU_EXCEPTION_MAX_TRY_DEPTH   25

Functions

void gu_Try_funct (jmp_buf *p_jmp_buf)
 Start a block that catches exceptions.

void gu_Throw (const char message[],...)
 Throw an exception as a printf()-style formated string.

void gu_CodeThrow (int code, const char message[],...)
void gu_ReThrow (void)
 Re-throw The last exception.


Variables

int gu_exception_code
char gu_exception [100]
int gu_exception_try_depth
int gu_exception_temp
int gu_exception_debug = 0


Detailed Description

Exception Handling.


Function Documentation

void gu_ReThrow void   ) 
 

Re-throw The last exception.

This is intended to be called from within a gu_Catch block in order to pass the exception higher up the call stack. It also is used to do the actually throwing for gu_Throw().

void gu_Throw const char  message[],
... 
 

Throw an exception as a printf()-style formated string.

When throwing an exception, one specifies a code number (which is passed to exit() if the exception is not caught) and an error message. The error message is a printf()-style format and arguments.

void gu_Try_funct jmp_buf *  p_jmp_buf  ) 
 

Start a block that catches exceptions.

This function is called by the gu_Try() macro.


Generated on Fri Feb 20 15:17:52 2004 for PPR Libraries by doxygen 1.3.5