error/exc.h File Reference
#include <setjmp.h>
#include "../msg.h"
Go to the source code of this file.
Classes |
struct | Nps_exc_t |
struct | Nps_exc_frame_t |
Defines |
#define | THROW(e,...) nps_throw(&(e),__FILE__,__LINE__,"" __VA_ARGS__) |
#define | RETHROW |
#define | TRY |
#define | CATCH |
#define | ON(e) |
#define | END_TRY |
#define | RETURN switch (Nps_exc_stack = Nps_exc_stack->prev,0) default: return |
Typedefs |
typedef struct Nps_exc_t | Nps_exc_t |
typedef struct Nps_exc_frame_t | Nps_exc_frame_t |
Enumerations |
enum | { Nps_exc_entered = 0,
Nps_exc_thrown,
Nps_exc_handled
} |
Functions |
void | nps_throw (const Nps_exc_t *e, const char *file, long line, const char *,...) |
Variables |
Nps_exc_frame_t * | Nps_exc_stack |
Define Documentation
Value:if (_exc_top.msg) fprintf(stderr,"Corrupted exception stack\n"),exit(1); \
} while (0);
Value:for (long _nps_exc_on_block=0; (!_nps_exc_on_block && &(e) == _exc_top.exc); \
++_nps_exc_on_block,Nps_exc_flag=Nps_exc_handled) \
Value:nps_throw(_exc_top.exc,_exc_top.file, \
_exc_top.line, _exc_top.msg)
#define THROW |
( |
e, |
|
|
... |
|
) |
nps_throw(&(e),__FILE__,__LINE__,"" __VA_ARGS__) |
Typedef Documentation
Enumeration Type Documentation
- Enumerator:
Nps_exc_entered |
|
Nps_exc_thrown |
|
Nps_exc_handled |
|
Function Documentation
void nps_throw |
( |
const Nps_exc_t * |
e, |
|
|
const char * |
file, |
|
|
long |
line, |
|
|
const char * |
, |
|
|
|
... | |
|
) |
| | |
Variable Documentation