bt2c::Logger: remove unused cLevel() method
[babeltrace.git] / include / babeltrace2 / error-reporting.h
index 8539ddf803daf6f5adb66ac553ea5c10a2fdf427..29e53e16b5d3b18fff9973855823d9f1b47bc57d 100644 (file)
@@ -1,28 +1,14 @@
-#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
@@ -400,7 +386,6 @@ properties:
 @brief
     Error.
 
-
 @typedef struct bt_error_cause bt_error_cause;
 
 @brief
@@ -448,7 +433,7 @@ Once you are done with the returned error, do one of:
     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
@@ -481,7 +466,7 @@ corresponds to catching an exception and discarding it.
     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
@@ -528,7 +513,7 @@ bt_error_release(bt_current_thread_take_error());
     library to the caller.
 */
 extern
-void bt_current_thread_clear_error(void);
+void bt_current_thread_clear_error(void) __BT_NOEXCEPT;
 
 /*! @} */
 
@@ -629,11 +614,12 @@ if no \bt_plugin provides the class of \bt_p{self_component}, with:
     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
@@ -728,12 +714,12 @@ if no \bt_plugin provides the component class of
     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
@@ -820,12 +806,12 @@ if no \bt_plugin provides \bt_p{self_component_class}, with:
     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
@@ -884,11 +870,12 @@ format string parameter \bt_p{message_format}.
     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
@@ -930,7 +917,7 @@ with \c __FILE__ and \c __LINE__ as its
 @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
@@ -957,7 +944,7 @@ uint64_t bt_error_get_cause_count(const bt_error *error);
 */
 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
@@ -988,7 +975,7 @@ corresponds to catching an exception and rethrowing it.
     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;
 
 /*! @} */
 
@@ -1042,7 +1029,7 @@ typedef enum bt_error_cause_actor_type {
 */
 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
@@ -1062,7 +1049,8 @@ bt_error_cause_actor_type bt_error_cause_get_actor_type(
 @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
@@ -1082,7 +1070,8 @@ const char *bt_error_cause_get_message(const bt_error_cause *error_cause);
 @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
@@ -1104,7 +1093,8 @@ const char *bt_error_cause_get_module_name(const bt_error_cause *error_cause);
 @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
@@ -1121,7 +1111,8 @@ const char *bt_error_cause_get_file_name(const bt_error_cause *error_cause);
 @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;
 
 /*! @} */
 
@@ -1154,7 +1145,7 @@ uint64_t bt_error_cause_get_line_number(const bt_error_cause *error_cause);
 */
 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
@@ -1175,7 +1166,7 @@ const char *bt_error_cause_component_actor_get_component_name(
 */
 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
@@ -1201,7 +1192,7 @@ bt_component_class_type bt_error_cause_component_actor_get_component_class_type(
 */
 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
@@ -1232,7 +1223,7 @@ component class.
 */
 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;
 
 /*! @} */
 
@@ -1266,7 +1257,7 @@ const char *bt_error_cause_component_actor_get_plugin_name(
 */
 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
@@ -1292,7 +1283,7 @@ const char *bt_error_cause_message_iterator_actor_get_component_output_port_name
 */
 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
@@ -1314,7 +1305,7 @@ const char *bt_error_cause_message_iterator_actor_get_component_name(
 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
@@ -1340,7 +1331,7 @@ bt_error_cause_message_iterator_actor_get_component_class_type(
 */
 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
@@ -1372,7 +1363,7 @@ component class.
 */
 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;
 
 /*! @} */
 
@@ -1401,7 +1392,7 @@ const char *bt_error_cause_message_iterator_actor_get_plugin_name(
 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
@@ -1427,7 +1418,7 @@ bt_error_cause_component_class_actor_get_component_class_type(
 */
 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
@@ -1458,7 +1449,7 @@ component class.
 */
 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;
 
 /*! @} */
 
This page took 0.026726 seconds and 4 git commands to generate.