Skip to content

Should not use throw in contracts.#359

Merged
greg7mdp merged 6 commits intomainfrom
no_throw
Jun 25, 2025
Merged

Should not use throw in contracts.#359
greg7mdp merged 6 commits intomainfrom
no_throw

Conversation

@greg7mdp
Copy link
Contributor

I mistakingly added a throw in bitset.hpp when copying code from spring.

@greg7mdp greg7mdp requested a review from linh2931 June 19, 2025 14:42
spoonincode
spoonincode previously approved these changes Jun 24, 2025
@spoonincode spoonincode dismissed their stale review June 24, 2025 20:22

Actually since we don't have branch protection based on CI configured here, removing this until fixing tests. Guess we'll need to point CI to Spring 2.0 libtester if we're going to include that test

@greg7mdp
Copy link
Contributor Author

@spoonincode why is the test failing exactly? I'm a little lost!

@heifner
Copy link
Contributor

heifner commented Jun 25, 2025

@spoonincode why is the test failing exactly? I'm a little lost!

/__w/cdt/cdt/tests/integration/bitset_tests.cpp:30:54: error: template argument 1 is invalid
   30 |       BOOST_REQUIRE_EQUAL(fc::raw::unpack<fc::bitset>(act_trace.return_value), fc::bitset{"1101"});

@spoonincode
Copy link
Contributor

If you're trying to gate that code maybe #if __has_include(<fc/bitset.hpp>)? Or we start using 2.0's libtester on cdt's main.

@greg7mdp
Copy link
Contributor Author

If you're trying to gate that code maybe #if __has_include(<fc/bitset.hpp>)? Or we start using 2.0's libtester on cdt's main.

I did try to gate that code (9e43412) but it is still failing.

@spoonincode
Copy link
Contributor

Can you is_class a type that doesn't exist though?

@heifner
Copy link
Contributor

heifner commented Jun 25, 2025

Can you is_class a type that doesn't exist though?

No, https://godbolt.org/z/6nj37hn64

@greg7mdp
Copy link
Contributor Author

Thanks @spoonincode no problem with the release/2.0 spring. Can you approve again?

@greg7mdp greg7mdp merged commit ff10448 into main Jun 25, 2025
7 checks passed
@greg7mdp greg7mdp deleted the no_throw branch June 25, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants