BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

except.h File Reference

Exception Handling in C. More...

Go to the source code of this file.

Data Structures

struct  pj_exception_state_t
 

Macros

#define PJ_USE_EXCEPTION
 
#define PJ_TRY
 
#define PJ_CATCH(id)
 
#define PJ_CATCH_ANY
 
#define PJ_END
 
#define PJ_THROW(exception_id)
 
#define PJ_GET_EXCEPTION()
 

Functions

pj_status_t pj_exception_id_alloc (const char *name, pj_exception_id_t *id)
 
pj_status_t pj_exception_id_free (pj_exception_id_t id)
 
const char * pj_exception_id_name (pj_exception_id_t id)
 
void pj_throw_exception_ (pj_exception_id_t id) PJ_ATTR_NORETURN
 
void pj_push_exception_handler_ (struct pj_exception_state_t *rec)
 
void pj_pop_exception_handler_ (struct pj_exception_state_t *rec)
 

Detailed Description

Exception Handling in C.

Macro Definition Documentation

◆ PJ_CATCH

#define PJ_CATCH (   id)

Catch the specified exception Id.

Parameters
idThe exception number to catch.

◆ PJ_CATCH_ANY

#define PJ_CATCH_ANY

Catch any exception number.

◆ PJ_END

#define PJ_END

End of exception specification block.

◆ PJ_GET_EXCEPTION

#define PJ_GET_EXCEPTION ( )

Get current exception.

Returns
Current exception code.

◆ PJ_THROW

#define PJ_THROW (   exception_id)

Throw exception.

Parameters
exception_idThe exception number.

◆ PJ_TRY

#define PJ_TRY

Start exception specification block.

◆ PJ_USE_EXCEPTION

#define PJ_USE_EXCEPTION

Declare that the function will use exception.

Function Documentation

◆ pj_pop_exception_handler_()

void pj_pop_exception_handler_ ( struct pj_exception_state_t rec)

Pop exception handler.

◆ pj_push_exception_handler_()

void pj_push_exception_handler_ ( struct pj_exception_state_t rec)

Push exception handler.

◆ pj_throw_exception_()

void pj_throw_exception_ ( pj_exception_id_t  id)

Throw exception.

Parameters
idException Id.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.