Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
ErrStack.h File Reference

Build and print an error stack for program failure. More...

#include "SysDefs.h"
#include "deprecated.h"

Go to the source code of this file.

Macros

#define _ERRSTACK_H_DEPRECATED
 

Functions

void blStoreError (char *routine, char *error)
 
void blShowErrors (void *PrintRoutine(char *), BOOL Trace)
 

Detailed Description

Build and print an error stack for program failure.

Version
V1.3
Date
14.08.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

This set of routines allows a stack of errors to be created. When a program has a fatal error, the StoreError() routine is called to place the error on the stack. As the program un-winds, each routine which fails stores it's error. Finally, before the program actually exits, it calls ShowErrors() to display the error stack.

Usage:

Revision History:

Definition in file ErrStack.h.

Macro Definition Documentation

#define _ERRSTACK_H_DEPRECATED

Definition at line 78 of file ErrStack.h.

Function Documentation

void blShowErrors ( void *  PrintRoutinechar *,
BOOL  Trace 
)
Parameters
[in]*PrintRoutineThe print routine or NULL
[in]TraceFlag to print routine names

Display the error stack using the supplied print routine or the simple default one if NULL is given.

  • 31.08.94 Original By: ACRM
  • 06.09.94 No longer tries to set PrintRoutine if was NULL (strict ANSI compliance)
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 182 of file ErrStack.c.

void blStoreError ( char *  routine,
char *  error 
)
Parameters
[in]*routineName of the routine generating the error
[in]*errorDescription of the error

Stores an error on the error stack.

  • 31.08.94 Original By: ACRM
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 137 of file ErrStack.c.