-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Return errors in keeper methods instead of panicking #15555
Comments
for begin and endblock we should have a way for users to say which error should halt the chain and which shouldnt. lots of benign issues could be avoided |
Maybe like a type "CriticalError", so if you get this type panic, and if not just log it |
yea that could work. this is the epic that eludes to something as well. #12985. |
Yes, totally in favor of errors where possible. I imagine 90% of keeper/module code can error. The only thing that needs to be able to panic is Begin/EndBlock and Message handlers. |
@facundomedica @tac0turtle can I take this issue? |
@tac0turtle closing this issue. As it is already addressed by #18636 |
Summary
Now that we are using the new storeService that returns an error for all methods we can return them instead of panic. It might need some other changes like stop using
Must...
kind of functionsProblem Definition
We panic in many different places.
Proposal
Stop panicking and be responsible for your errors
Module list
The text was updated successfully, but these errors were encountered: