![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
Data Structures | |
| struct | ExceptionContextList |
| Exception stack structure. More... | |
Macros | |
| #define | ARRAY_EXCEPTION 2 |
| Possibly Throwed value, we checked an out of bound operation. | |
| #define | Catch(X) |
| Macro for replacing catch. | |
| #define | CatchAll() |
| Macro for replacing catch. | |
| #define | DIVZERO_EXCEPTION 4 |
| Possibly Throwed value, we check a divide by zero operation. | |
| #define | EndTry |
| Macro helper for closing the try-catch block. | |
| #define | GENERAL_EXCEPTION ARRAY_EXCEPTION | DIVZERO_EXCEPTION | OVERFLOW_EXCEPTION | PARSING_EXCEPTION |
| General exception, we just detected an error an decided to go back where we're safe. | |
| #define | NO_EXCEPTION 0 |
| Possibly Throwed value, everything is fine. | |
| #define | OVERFLOW_EXCEPTION 8 |
| Possibly Throwed value, we checked an overflow in our arrays. | |
| #define | PARSING_EXCEPTION 16 |
| Possibly Throwed value, we checked an error during a char * parsing. | |
| #define | Throw(X) |
| Macro helper for adding exception throwing in custom functions. | |
| #define | Try |
| Macro for replacing try. | |
Functions | |
| void | pop_exception (int) |
| Function to pop an exception in the list. | |
| void | push_exception (void) |
| Function to push an exception in the list. | |
Variables | |
| ExceptionContextList * | __Exceptions |
| Globale variable for exception stack management. | |
| struct ExceptionContextList |
Exception stack structure.
Definition at line 40 of file n_exceptions.h.
Collaboration diagram for ExceptionContextList:| Data Fields | ||
|---|---|---|
| jmp_buf | context | saving the current context |
| struct ExceptionContextList * | head | pointer to the next stacked exception |
| #define ARRAY_EXCEPTION 2 |
Possibly Throwed value, we checked an out of bound operation.
Definition at line 28 of file n_exceptions.h.
| #define Catch | ( | X | ) |
Macro for replacing catch.
Definition at line 63 of file n_exceptions.h.
| #define CatchAll | ( | ) |
Macro for replacing catch.
Definition at line 69 of file n_exceptions.h.
| #define DIVZERO_EXCEPTION 4 |
Possibly Throwed value, we check a divide by zero operation.
Definition at line 30 of file n_exceptions.h.
| #define EndTry |
Macro helper for closing the try-catch block.
Definition at line 75 of file n_exceptions.h.
| #define GENERAL_EXCEPTION ARRAY_EXCEPTION | DIVZERO_EXCEPTION | OVERFLOW_EXCEPTION | PARSING_EXCEPTION |
General exception, we just detected an error an decided to go back where we're safe.
Definition at line 37 of file n_exceptions.h.
| #define NO_EXCEPTION 0 |
Possibly Throwed value, everything is fine.
Definition at line 26 of file n_exceptions.h.
| #define OVERFLOW_EXCEPTION 8 |
Possibly Throwed value, we checked an overflow in our arrays.
Definition at line 32 of file n_exceptions.h.
| #define PARSING_EXCEPTION 16 |
Possibly Throwed value, we checked an error during a char * parsing.
Definition at line 34 of file n_exceptions.h.
| #define Throw | ( | X | ) |
Macro helper for adding exception throwing in custom functions.
Definition at line 81 of file n_exceptions.h.
| #define Try |
Macro for replacing try.
Definition at line 56 of file n_exceptions.h.
| void pop_exception | ( | int | ex | ) |
Function to pop an exception in the list.
| ex | Type of exception to pop |
Definition at line 34 of file n_exceptions.c.
References __Exceptions, ExceptionContextList::context, Free, ExceptionContextList::head, and NO_EXCEPTION.
| void push_exception | ( | void | ) |
Function to push an exception in the list.
Definition at line 19 of file n_exceptions.c.
References __Exceptions, ExceptionContextList::head, LOG_ERR, and n_log.
|
extern |
Globale variable for exception stack management.
Definition at line 14 of file n_exceptions.c.
Referenced by pop_exception(), and push_exception().