exception.hh
Go to the documentation of this file.
1 // Copyright 2010, Florent Lamiraux, Thomas Moulard, LAAS-CNRS.
2 
3 #ifndef DYNAMIC_GRAPH_PYTHON_EXCEPTION
4 #define DYNAMIC_GRAPH_PYTHON_EXCEPTION
5 
7 
10 #define CATCH_ALL_EXCEPTIONS(m) \
11  catch (const std::exception& exc) { \
12  PyErr_SetString(DGPYERROR(m), exc.what()); \
13  return NULL; \
14  } \
15  catch (const char* s) { \
16  PyErr_SetString(DGPYERROR(m), s); \
17  return NULL; \
18  } \
19  catch (...) { \
20  PyErr_SetString(DGPYERROR(m), "Unknown exception"); \
21  return NULL; \
22  } \
23  struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
24 
25 #endif
dynamic-graph-py.hh