-
Notifications
You must be signed in to change notification settings - Fork 43
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
Added error checks in examples #800
Conversation
I don't think these errors has anything to do with the changes you've made |
a286786
to
4929571
Compare
@sczembor the htlc-pyteal example script is working on my local but it is failing on CI. could you please confirm if it is failing on your local as well.? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some problems with formatting.
yeah I checked the formatting, and it is right, the change is because we have another set of curly brackets (for try and catch) now which affected the whole function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, however I think we should rethink it. Maybe it would be better to throw the error inside of deployer? I am not sure about creating more wrappers for deployer since the examples are supposed to show real use cases that user can just adopt in their projects.
The better solution to this can be to directly throw the error in executeTx method, like I did with web package, then in the examples we only need to catch it in places where the Transaction is SUPPOSED TO FAIL, and all other places if it failed it will throw an error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve. I left few comments. I am still not sure about the .catch.throw
construction. Maybe we can achieve the same results with different approach. Lets discuss it tomorrow during the review
Co-authored-by: sczembor <[email protected]>
No description provided.