diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48a04499..dad49be8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -202,8 +202,8 @@ jobs: container: image: ${{matrix.platform.container}} volumes: - - /node20217:/node20217:rw,rshared - - ${{ startsWith(matrix.platform.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }} + - /node24217:/node24217:rw,rshared + - ${{ startsWith(matrix.platform.container, 'ubuntu:1') && '/node24217:/__e/node24:ro,rshared' || ' ' }} defaults: run: @@ -216,12 +216,11 @@ jobs: apt-get update apt-get -y install sudo python3 git g++ curl xz-utils - - name: Install nodejs20glibc2.17 + - name: Install nodejs24glibc2.17 if: ${{ startsWith( matrix.platform.container, 'ubuntu:1' ) }} run: | - curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz - tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - ldd /__e/node20/bin/node + curl -LO https://archives.boost.io/misc/node/node-v24.15.0-linux-x64-glibc-217.tar.xz + tar -xf node-v24.15.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node24217 - uses: actions/checkout@v4 diff --git a/include/boost/leaf/handle_errors.hpp b/include/boost/leaf/handle_errors.hpp index 39387863..f7257abf 100644 --- a/include/boost/leaf/handle_errors.hpp +++ b/include/boost/leaf/handle_errors.hpp @@ -780,6 +780,7 @@ namespace detail #endif { std::forward(try_block)(); + sl.deactivate(); return {}; } #ifndef BOOST_LEAF_NO_EXCEPTIONS diff --git a/test/try_capture_all_test.cpp b/test/try_capture_all_test.cpp index 08ea9bb3..9508dd23 100644 --- a/test/try_capture_all_test.cpp +++ b/test/try_capture_all_test.cpp @@ -88,6 +88,20 @@ int main() BOOST_TEST_EQ(r1, 1); } #endif // #ifndef BOOST_LEAF_NO_EXCEPTIONS + { + leaf::result r = leaf::try_capture_all( []() { } ); + BOOST_TEST(r); + } + { + leaf::result r = leaf::try_capture_all( + []() + { + (void) leaf::new_error(err<1>{}, err<2>{}); + }); + BOOST_TEST(r); + } + BOOST_TEST_EQ(err<1>::count, 0); + BOOST_TEST_EQ(err<2>::count, 0); { leaf::result r = leaf::try_capture_all( []() -> leaf::result