-#ifndef BABELTRACE2_ERROR_REPORTING_H
-#define BABELTRACE2_ERROR_REPORTING_H
-
/*
- * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
+ * SPDX-License-Identifier: MIT
*
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
*/
+/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
+
+#ifndef BABELTRACE2_ERROR_REPORTING_H
+#define BABELTRACE2_ERROR_REPORTING_H
+
#ifndef __BT_IN_BABELTRACE_H
# error "Please include <babeltrace2/babeltrace.h> instead."
#endif
@brief
Error.
-
@typedef struct bt_error_cause bt_error_cause;
@brief
Moves an error's ownership to the library.
*/
extern
-const bt_error *bt_current_thread_take_error(void);
+const bt_error *bt_current_thread_take_error(void) __BT_NOEXCEPT;
/*!
@brief
Calls this function and assigns \c NULL to the expression.
*/
extern
-void bt_current_thread_move_error(const bt_error *error);
+void bt_current_thread_move_error(const bt_error *error) __BT_NOEXCEPT;
/*!
@brief
library to the caller.
*/
extern
-void bt_current_thread_clear_error(void);
+void bt_current_thread_clear_error(void) __BT_NOEXCEPT;
/*! @} */
Calls this function with \c __FILE__ and \c __LINE__ as the
\bt_p{file_name} and \bt_p{line_number} parameters.
*/
-extern
+extern __BT_ATTR_FORMAT_PRINTF(4, 5)
bt_current_thread_error_append_cause_status
bt_current_thread_error_append_cause_from_component(
bt_self_component *self_component, const char *file_name,
- uint64_t line_number, const char *message_format, ...);
+ uint64_t line_number,
+ const char *message_format, ...) __BT_NOEXCEPT;
/*!
@brief
Calls this function with \c __FILE__ and \c __LINE__ as the
\bt_p{file_name} and \bt_p{line_number} parameters.
*/
-extern
+extern __BT_ATTR_FORMAT_PRINTF(4, 5)
bt_current_thread_error_append_cause_status
bt_current_thread_error_append_cause_from_message_iterator(
bt_self_message_iterator *self_message_iterator,
const char *file_name, uint64_t line_number,
- const char *message_format, ...);
+ const char *message_format, ...) __BT_NOEXCEPT;
/*!
@brief
Calls this function with \c __FILE__ and \c __LINE__ as the
\bt_p{file_name} and \bt_p{line_number} parameters.
*/
-extern
+extern __BT_ATTR_FORMAT_PRINTF(4, 5)
bt_current_thread_error_append_cause_status
bt_current_thread_error_append_cause_from_component_class(
bt_self_component_class *self_component_class,
const char *file_name, uint64_t line_number,
- const char *message_format, ...);
+ const char *message_format, ...) __BT_NOEXCEPT;
/*!
@brief
Calls this function with \c __FILE__ and \c __LINE__ as the
\bt_p{file_name} and \bt_p{line_number} parameters.
*/
-extern
+extern __BT_ATTR_FORMAT_PRINTF(4, 5)
bt_current_thread_error_append_cause_status
bt_current_thread_error_append_cause_from_unknown(
const char *module_name, const char *file_name,
- uint64_t line_number, const char *message_format, ...);
+ uint64_t line_number,
+ const char *message_format, ...) __BT_NOEXCEPT;
/*!
@brief
@bt_pre_not_null{error}
*/
extern
-uint64_t bt_error_get_cause_count(const bt_error *error);
+uint64_t bt_error_get_cause_count(const bt_error *error) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const bt_error_cause *bt_error_borrow_cause_by_index(
- const bt_error *error, uint64_t index);
+ const bt_error *error, uint64_t index) __BT_NOEXCEPT;
/*!
@brief
Moves an error's ownership to the library.
*/
extern
-void bt_error_release(const bt_error *error);
+void bt_error_release(const bt_error *error) __BT_NOEXCEPT;
/*! @} */
*/
extern
bt_error_cause_actor_type bt_error_cause_get_actor_type(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
@bt_pre_not_null{error_cause}
*/
extern
-const char *bt_error_cause_get_message(const bt_error_cause *error_cause);
+const char *bt_error_cause_get_message(
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
@bt_pre_not_null{error_cause}
*/
extern
-const char *bt_error_cause_get_module_name(const bt_error_cause *error_cause);
+const char *bt_error_cause_get_module_name(
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
@bt_pre_not_null{error_cause}
*/
extern
-const char *bt_error_cause_get_file_name(const bt_error_cause *error_cause);
+const char *bt_error_cause_get_file_name(
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
@bt_pre_not_null{error_cause}
*/
extern
-uint64_t bt_error_cause_get_line_number(const bt_error_cause *error_cause);
+uint64_t bt_error_cause_get_line_number(
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*! @} */
*/
extern
const char *bt_error_cause_component_actor_get_component_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
bt_component_class_type bt_error_cause_component_actor_get_component_class_type(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_component_actor_get_component_class_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_component_actor_get_plugin_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*! @} */
*/
extern
const char *bt_error_cause_message_iterator_actor_get_component_output_port_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_message_iterator_actor_get_component_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
extern
bt_component_class_type
bt_error_cause_message_iterator_actor_get_component_class_type(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_message_iterator_actor_get_component_class_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_message_iterator_actor_get_plugin_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*! @} */
extern
bt_component_class_type
bt_error_cause_component_class_actor_get_component_class_type(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_component_class_actor_get_component_class_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*!
@brief
*/
extern
const char *bt_error_cause_component_class_actor_get_plugin_name(
- const bt_error_cause *error_cause);
+ const bt_error_cause *error_cause) __BT_NOEXCEPT;
/*! @} */