| 1 | /** |
| 2 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | * SPDX-License-Identifier: Apache-2.0. |
| 4 | */ |
| 5 | |
| 6 | #include <aws/common/common.h> |
| 7 | |
| 8 | static AWS_THREAD_LOCAL int tl_last_error = 0; |
| 9 | |
| 10 | /** |
| 11 | * It overrides the original aws_raise_error_private implementation, to avoid |
| 12 | * error handler functions (unnecessary for the verification process). |
| 13 | */ |
| 14 | void aws_raise_error_private(int err) { |
| 15 | tl_last_error = err; |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * It overrides the original aws_last_error implementation. |
| 20 | */ |
| 21 | int aws_last_error(void) { |
| 22 | return tl_last_error; |
| 23 | } |