bt2: make bt2.Error wrap current thread's error
[babeltrace.git] / include / babeltrace2 / current-thread.h
index 18da2513ff66be5670ec285594fc60b1242a802b..39c6ae228724d056eb5bcdf950e7ef1c5d27537f 100644 (file)
@@ -89,6 +89,12 @@ bt_current_thread_error_append_cause_from_message_iterator(
        bt_current_thread_error_append_cause_from_message_iterator( \
                (_self_iter), __FILE__, __LINE__, (_msg_fmt), ##__VA_ARGS__)
 
+#define BT_CURRENT_THREAD_MOVE_ERROR_AND_RESET(_var)   \
+       do {                                            \
+               bt_current_thread_move_error(_var);     \
+               (_var) = NULL;                          \
+       } while (0)
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.025392 seconds and 4 git commands to generate.