Line data Source code
1 : #ifndef AWS_COMMON_ERROR_INL
2 : #define AWS_COMMON_ERROR_INL
3 :
4 : /**
5 : * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6 : * SPDX-License-Identifier: Apache-2.0.
7 : */
8 :
9 : #include <aws/common/error.h>
10 :
11 : AWS_EXTERN_C_BEGIN
12 :
13 : /*
14 : * Raises `err` to the installed callbacks, and sets the thread's error.
15 : */
16 : AWS_STATIC_IMPL
17 534552 : int aws_raise_error(int err) {
18 534552 : /*
19 534552 : * Certain static analyzers can't see through the out-of-line call to aws_raise_error,
20 534552 : * and assume that this might return AWS_OP_SUCCESS. We'll put the return inline just
21 534552 : * to help with their assumptions.
22 534552 : */
23 534552 :
24 534552 : aws_raise_error_private(err);
25 534552 :
26 534552 : return AWS_OP_ERR;
27 534552 : }
28 :
29 : AWS_EXTERN_C_END
30 :
31 : #endif /* AWS_COMMON_ERROR_INL */
|