https://github.com/teuben/nemo
Tip revision: 738a73b7c231dbcaa6218d977354d65263dbd6d2 authored by Peter Teuben on 22 May 2010, 22:47:18 UTC
committed as work I must have done a while back (2007?) to get plplot
committed as work I must have done a while back (2007?) to get plplot
Tip revision: 738a73b
exception.h
#ifndef NEMO_EXCEP
#define NEMO_EXCEP
#include <stdinc.h>
// marks point of return from exception handler
extern int BeginBlock (void);
// turns off exception handling for the block begun
// with the last BeginBlock; does cleanup of memory and streams
extern int EndBlock (void);
// Marks allocated memory as resource to be freed when
// error occurs
extern int RegisterPointer (void * ptr);
// Unmarks resource - for example, when it is freed
extern int UnRegisterPointer (void * ptr);
extern int RegisterStream (stream fptr);
extern int UnRegisterStream (stream fptr);
// Raises exception when irretrievable error occurs
// Transfers control to exception handling mechanism
extern void RaiseException (int errNumber);
// Restores context after exception handling is done
extern void RestoreUserContext (void);
// extern void FreeAllNemoResources (void);
#endif /* NEMO_EXCEP */