Skip to content
Snippets Groups Projects
Commit cfe34c99 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'catch-debug' into 'master'

Revert non-catching try-blocks in debug-mode @1de85e09 to avoid crashing applica…

…tions built in debug mode (c.f. bob.io.image#16)

See merge request !12
parents d4d726f6 f2939068
Branches
Tags
1 merge request!12Revert non-catching try-blocks in debug-mode @1de85e09 to avoid crashing applica…
Pipeline #
......@@ -33,21 +33,16 @@
#define PyBob_NumberCheck(x) (PyInt_Check(x) || PyLong_Check(x) || PyFloat_Check(x) || PyComplex_Check(x))
#ifdef BOB_DEBUG
#define BOB_TRY {
#define BOB_CATCH_MEMBER(m,r) }
#define BOB_CATCH_FUNCTION(m,r) }
#else // BOB_DEBUG
// BOB_TRY is simply a try{
#define BOB_TRY try{
// for catching exceptions, you can define a message, and you have to select the error return value (i.e., -1 for constructors, and 0 for other functions)
// for catching exceptions, you can define a message, and you have to select
// the error return value (i.e., -1 for constructors, and 0 for other
// functions)
// There exist two macros that will print slightly different messages.
// BOB_CATCH_MEMBER is to be used within the binding of a class, and it will use the "self" pointer
// BOB_CATCH_MEMBER is to be used within the binding of a class, and it will
// use the "self" pointer
// BOB_CATCH_FUNCTION is to be used to bind functions outside a class
#define BOB_CATCH_MEMBER(message,ret) }\
catch (std::exception& e) {\
......@@ -69,6 +64,4 @@
return ret;\
}
#endif // BOB_DEBUG
#endif // BOB_EXTENSION_DEFINES_H_INCLUDED
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment