error_handler.h: Remove return statements after throw (#1613)

This commit is contained in:
Roland Reichwein 2026-10-11 09:51:55 +02:00 committed by GitHub
parent a2da3ed940
commit a8ab0bbeea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -28,7 +28,7 @@
![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-c++26.yml/badge.svg?branch=master)
![CI](https://github.com/ETLCPP/etl/actions/workflows/clang-syntax-checks.yml/badge.svg?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3c14cd918ccf40008d0bcd7b083d5946)](https://www.codacy.com/manual/jwellbelove/etl?utm_source=github.com&utm_medium=referral&utm_content=ETLCPP/etl&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/c0c29f7b84554166b577e8a98fc18d0b)](https://app.codacy.com/gh/ETLCPP/etl/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/ETLCPP)

View File

@ -367,7 +367,6 @@ namespace etl
{ \
etl::error_handler::error((e)); \
throw((e)); \
return; \
} \
} while (false) // If the condition fails, calls the error handler then
// throws an exception.
@ -377,7 +376,6 @@ namespace etl
{ \
etl::error_handler::error((e)); \
throw((e)); \
return (v); \
} \
} while (false) // If the condition fails, calls the error handler then
// throws an exception.
@ -391,13 +389,11 @@ namespace etl
do { \
etl::error_handler::error((e)); \
throw((e)); \
return; \
} while (false) // Calls the error handler then throws an exception.
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) \
do { \
etl::error_handler::error((e)); \
throw((e)); \
return (v); \
} while (false) // Calls the error handler then throws an exception.
#else
#define ETL_ASSERT(b, e) \