From a8ab0bbeea9b2049afe38031247fa551dd996ec3 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 11 Oct 2026 09:51:55 +0200 Subject: [PATCH] error_handler.h: Remove return statements after throw (#1613) --- README.md | 2 +- include/etl/error_handler.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index d66d2037..5b3a50cc 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/include/etl/error_handler.h b/include/etl/error_handler.h index 9f7dfba6..e234d9bb 100644 --- a/include/etl/error_handler.h +++ b/include/etl/error_handler.h @@ -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) \