|
41 | 41 | /// and execute \a error_statement in that case. |
42 | 42 | /** |
43 | 43 | * The rcl error message will be added to \a base_message, and the rcl error state will be reset. |
44 | | - * |
| 44 | + * |
45 | 45 | * \param env a JNIEnv pointer, used to throw a java exception from the rcl error. |
46 | 46 | * \param ret rcl_ret_t error that will be checked. |
47 | 47 | * \param message error message that will be passed to the thrown exception. |
|
52 | 52 | #define RCLJAVA_COMMON_THROW_FROM_RCL_X(env, ret, base_message, error_statement) \ |
53 | 53 | do { \ |
54 | 54 | if (RCL_RET_OK != ret) { \ |
55 | | - rcljava_common::exception::rcljava_throw_rclexception( \ |
56 | | - env, ret, static_cast<std::string>(message) + ": " + rcl_get_error_string().str); \ |
57 | | - rcl_reset_error(); |
| 55 | + rcljava_common::exceptions::rcljava_throw_rclexception( \ |
| 56 | + env, ret, static_cast<std::string>(base_message) + ": " + rcl_get_error_string().str); \ |
| 57 | + rcl_reset_error(); \ |
58 | 58 | error_statement; \ |
59 | 59 | } \ |
60 | 60 | } while (0) |
|
65 | 65 | * \param ret rcl_ret_t error that will be checked. |
66 | 66 | * \param message error message that will be passed to the thrown exception. |
67 | 67 | */ |
68 | | -#define RCLJAVA_COMMON_THROW_FROM_RCL(env, ret, message) \ |
69 | | - RCLJAVA_COMMON_THROW_FROM_RCL_X(env, ret, message, return ) |
| 68 | +#define RCLJAVA_COMMON_THROW_FROM_RCL(env, ret, base_message) \ |
| 69 | + RCLJAVA_COMMON_THROW_FROM_RCL_X(env, ret, base_message, return ) |
70 | 70 |
|
71 | 71 | namespace rcljava_common |
72 | 72 | { |
|
0 commit comments