| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifdef HAVE_RTYPER |
| 6 |
|
| 7 |
|
| 8 |
#define RPyExceptionOccurred RPyExceptionOccurred1 |
| 9 |
#define RPY_DEBUG_RETURN() |
| 10 |
|
| 11 |
|
| 12 |
#ifdef DO_LOG_EXC |
| 13 |
#undef RPyExceptionOccurred |
| 14 |
#undef RPY_DEBUG_RETURN |
| 15 |
#define RPyExceptionOccurred() RPyDebugException(" noticing a") |
| 16 |
#define RPY_DEBUG_RETURN() RPyDebugException("leaving with") |
| 17 |
#define RPyDebugException(msg) ( \ |
| 18 |
RPyExceptionOccurred1() \ |
| 19 |
? (RPyDebugReturnShowException(msg, __FILE__, __LINE__, __FUNCTION__), 1) \ |
| 20 |
: 0 \ |
| 21 |
) |
| 22 |
#endif |
| 23 |
|
| 24 |
|
| 25 |
RPY_EXTERN |
| 26 |
void RPyDebugReturnShowException(const char *msg, const char *filename, |
| 27 |
long lineno, const char *functionname); |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
#define RPyFetchException(etypevar, evaluevar, type_of_evaluevar) do { \ |
| 33 |
etypevar = RPyFetchExceptionType(); \ |
| 34 |
evaluevar = (type_of_evaluevar)RPyFetchExceptionValue(); \ |
| 35 |
RPyClearException(); \ |
| 36 |
} while (0) |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
RPY_EXTERN |
| 41 |
void _RPyRaiseSimpleException(RPYTHON_EXCEPTION rexc); |
| 42 |
|
| 43 |
#endif |