Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[should_panic] with const variable error messages #2863

Open
EgeCaner opened this issue Jan 21, 2025 · 0 comments
Open

#[should_panic] with const variable error messages #2863

EgeCaner opened this issue Jan 21, 2025 · 0 comments
Labels

Comments

@EgeCaner
Copy link

Which component is your feature related to?

Forge

Feature Request

Currently should panic with single felt error messages

#[should_panic(expected: 'Some Error Message')]

If possible what would be nice is where SomeContract::Error::SOME_ERROR_MESSAGE is a const felt252

#[should_panic(expected: SomeContract::Error::SOME_ERROR_MESSAGE)]

Every time when I update the error message in a contract I need to update all the should_panic s as well. This will elimate that concern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

No branches or pull requests

1 participant