Wireshark 4.5.0
The Wireshark network protocol analyzer
|
#include <glib.h>
#include <setjmp.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include "ws_symbol_export.h"
#include "ws_attributes.h"
Go to the source code of this file.
Classes | |
struct | except_id_t |
struct | except_t |
struct | except_cleanup |
struct | except_catch |
struct | except_stacknode |
Macros | |
#define | XCEPT_GROUP_ANY 0 |
#define | XCEPT_CODE_ANY 0 |
#define | XCEPT_BAD_ALLOC 1 |
#define | except_code(E) ((E)->except_id.except_code) |
#define | except_group(E) ((E)->except_id.except_group) |
#define | except_message(E) ((E)->except_message) |
#define | except_data(E) ((E)->except_dyndata) |
#define | except_cleanup_push(F, C) |
#define | except_cleanup_pop(E) |
#define | except_checked_cleanup_pop(F, E) |
#define | except_cleanup_push_pfx(pfx, F, C) |
#define | except_cleanup_pop_pfx(pfx, E) |
#define | except_checked_cleanup_pop_pfx(pfx, F, E) |
#define | except_try_push(ID, NUM, PPE) |
#define | except_try_pop() |
Enumerations | |
enum | { except_no_call , except_call } |
enum | except_stacktype { XCEPT_CLEANUP , XCEPT_CATCHER } |
Functions | |
void | except_setup_clean (struct except_stacknode *, struct except_cleanup *, void(*)(void *), void *) |
WS_DLL_PUBLIC void | except_setup_try (struct except_stacknode *, struct except_catch *, const except_id_t[], size_t) |
WS_DLL_PUBLIC struct except_stacknode * | except_pop (void) |
WS_DLL_PUBLIC int | except_init (void) |
WS_DLL_PUBLIC void | except_deinit (void) |
WS_DLL_PUBLIC WS_NORETURN void | except_rethrow (except_t *) |
WS_DLL_PUBLIC WS_NORETURN void | except_throw (long, long, const char *) |
WS_DLL_PUBLIC WS_NORETURN void | except_throwd (long, long, const char *, void *) |
WS_DLL_PUBLIC WS_NORETURN void | except_vthrowf (long group, long code, const char *fmt, va_list vl) |
WS_DLL_PUBLIC WS_NORETURN void | except_throwf (long, long, const char *,...) G_GNUC_PRINTF(3 |
unsigned long | except_code (except_t *) |
unsigned long | except_group (except_t *) |
const char * | except_message (except_t *) |
void * | except_data (except_t *) |
WS_DLL_PUBLIC void * | except_take_data (except_t *) |
WS_DLL_PUBLIC void | except_set_allocator (void *(*)(size_t), void(*)(void *)) |
WS_DLL_PUBLIC void * | except_alloc (size_t) |
WS_DLL_PUBLIC void | except_free (void *) |
Variables | |
WS_DLL_PUBLIC WS_NORETURN void WS_DLL_PUBLIC void(*)(except_t *) | except_unhandled_catcher (void(*)(except_t *)) |
Portable Exception Handling for ANSI C.
Modified to support throwing an exception with a null message pointer, and to have the message not be const (as we generate messages with "ws_strdup_printf()", which means they need to be freed; using a null message means that we don't have to use a special string for exceptions with no message, and don't have to worry about not freeing that).
#define except_checked_cleanup_pop | ( | F, | |
E | |||
) |
#define except_checked_cleanup_pop_pfx | ( | pfx, | |
F, | |||
E | |||
) |
#define except_cleanup_pop | ( | E | ) |
#define except_cleanup_pop_pfx | ( | pfx, | |
E | |||
) |
#define except_cleanup_push | ( | F, | |
C | |||
) |
#define except_cleanup_push_pfx | ( | pfx, | |
F, | |||
C | |||
) |
#define except_try_pop | ( | ) |
#define except_try_push | ( | ID, | |
NUM, | |||
PPE | |||
) |