File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
rcljava_common/include/rcljava_common Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1919
2020#include " rcljava_common/visibility_control.hpp"
2121
22+ // / Execute \a error_statement if an exception has happened.
23+ /* *
24+ * \param env a JNIEnv pointer, used to check for exceptions.
25+ * \param error_statement statement executed if an exception has happened.
26+ */
27+ #define RCLJAVA_COMMON_EXCEPTION_CHECK_X (env, error_statement ) \
28+ do { \
29+ if (env->ExceptionCheck ()) { \
30+ error_statement; \
31+ } \
32+ } while (0 )
33+
34+ // / Return from the current function if a java exception has happened.
35+ /* *
36+ * \param env a JNIEnv pointer, used to check for exceptions.
37+ */
38+ #define RCLJAVA_COMMON_EXCEPTION_CHECK (env ) RCLJAVA_COMMON_EXCEPTION_CHECK_X(env, return )
39+
2240namespace rcljava_common
2341{
2442namespace exceptions
You can’t perform that action at this time.
0 commit comments