Main Page   Compound List   File List   Compound Members   File Members  

lib/errormgr.c File Reference

Error manager. More...

#include "gobj/errormgr.h"
#include "gobj/errors.h"
#include "gobj/error.h"
#include "gobj/lang.h"
#include <stdio.h>
#include <stdlib.h>

Compounds

struct  Gj_Errormgr_struct

Defines

#define GJ_ERRORMGR_MAXERRS   1000
 Maximal error count.


Functions

void gj_exit (char* module, int line, char* str, char* str2)
 Exit the program. More...

Gj_ErrormgrGj_errormgr_new (Gj_Ctx* ctx)
 Create a new error manager. More...

Gj_ErrormgrGj_errormgr_createInitial ()
 Create a initial error manager. More...

void Gj_errormgr_delete (Gj_Ctx* ctx)
 Destroy the error manager.

void Gj_errormgr_addError (Gj_Ctx* ctx, Gj_Error* err)
 Add an error to the error chain.

void Gj_errormgr_clear (Gj_Ctx* ctx)
 Clear the error chain.

void Gj_errormgr_createError (Gj_Ctx* ctx)
 Make sure that there IS an error in the error chain (create one if needed).

Gj_Bool Gj_errormgr_errOccured (Gj_Ctx* ctx)
 Test if an error has occured.

Gj_Bool Gj_errormgr_isFatal (Gj_Ctx* ctx)
 Test if the error is fatal.

Gj_ErrorGj_errormgr_nextError (Gj_Ctx* ctx, Gj_Error* ptr)
 Get the next element of the error walkthrough. More...


Detailed Description

Error manager.


Function Documentation

void gj_exit ( char * module,
int line,
char * str,
char * str2 )
 

Exit the program.

For internal use only.

Gj_Errormgr * Gj_errormgr_new ( Gj_Ctx * ctx )
 

Create a new error manager.

Returns:
The pointer to the new error manager on success, 0 otherwise.

Gj_Errormgr * Gj_errormgr_createInitial ( )
 

Create a initial error manager.

This function should only be used if there is no usable context available.

Returns:
The pointer to the new error manager on success, 0 otherwise.

Gj_Error * Gj_errormgr_nextError ( Gj_Ctx * ctx,
Gj_Error * error )
 

Get the next element of the error walkthrough.

If error is 0, the first element is returned. To get the next element, error should be the result of the last call. The returned error is STILL OWNED by the errormgr. A null pointer is returned if the last element of was already reached. The last error is returned first.


Generated at Fri Aug 17 18:28:56 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000