|
Home --> Documentations --> PJLIB Reference
Go to the documentation of this file.
20 #ifndef __PJ_EXCEPTION_H__
21 #define __PJ_EXCEPTION_H__
29 #include <pj/compat/setjmp.h>
266 #if defined(PJ_EXCEPTION_USE_WIN32_SEH) && PJ_EXCEPTION_USE_WIN32_SEH != 0
272 #define WIN32_LEAN_AND_MEAN
278 RaiseException( id,1,0,NULL);
281 #define PJ_USE_EXCEPTION
283 #define PJ_CATCH(id) __except(GetExceptionCode()==id ? \
284 EXCEPTION_EXECUTE_HANDLER : \
285 EXCEPTION_CONTINUE_SEARCH)
286 #define PJ_CATCH_ANY __except(EXCEPTION_EXECUTE_HANDLER)
288 #define PJ_THROW(id) pj_throw_exception_(id)
289 #define PJ_GET_EXCEPTION() GetExceptionCode()
292 #elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
310 #define PJ_USE_EXCEPTION
313 #define PJ_CATCH_ANY catch (const TPjException & pj_excp_)
315 #define PJ_THROW(x_id) do { TPjException e; e.code_=x_id; throw e;} \
317 #define PJ_GET_EXCEPTION() pj_excp_.code_
321 #define PJ_USE_EXCEPTION
323 #define PJ_CATCH_ANY if (0)
325 #define PJ_THROW(x_id) do { PJ_LOG(1,("PJ_THROW"," error code = %d",x_id)); } while (0)
326 #define PJ_GET_EXCEPTION() 0
368 #define PJ_USE_EXCEPTION struct pj_exception_state_t pj_x_except__; int pj_x_code__
374 #define PJ_TRY if (1) { \
375 pj_push_exception_handler_(&pj_x_except__); \
376 pj_x_code__ = pj_setjmp(pj_x_except__.state); \
377 if (pj_x_code__ == 0)
383 #define PJ_CATCH(id) else if (pj_x_code__ == (id))
389 #define PJ_CATCH_ANY else
395 #define PJ_END pj_pop_exception_handler_(&pj_x_except__); \
403 #define PJ_THROW(exception_id) pj_throw_exception_(exception_id)
410 #define PJ_GET_EXCEPTION() (pj_x_code__)
PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.
|