X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace2%2Ferror-reporting.h;h=43922e23d3fa1fd28643b142cf94b9654bd57b9e;hp=4916ef671f63d7cc36530d159f505977416f3028;hb=HEAD;hpb=8b305066676fc7aa433e8eb668f9de8802008025 diff --git a/include/babeltrace2/error-reporting.h b/include/babeltrace2/error-reporting.h index 4916ef67..29e53e16 100644 --- a/include/babeltrace2/error-reporting.h +++ b/include/babeltrace2/error-reporting.h @@ -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: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * SPDX-License-Identifier: MIT * - * 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 */ + +#ifndef BABELTRACE2_ERROR_REPORTING_H +#define BABELTRACE2_ERROR_REPORTING_H + #ifndef __BT_IN_BABELTRACE_H # error "Please include 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; /*! @} */ @@ -633,7 +618,8 @@ 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 @@ -733,7 +719,7 @@ 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 @@ -825,7 +811,7 @@ 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 @@ -888,7 +874,8 @@ 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; /*! @} */