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

Added error checks in examples #800

Merged
merged 19 commits into from
Oct 28, 2022
Merged

Added error checks in examples #800

merged 19 commits into from
Oct 28, 2022

Conversation

Megha-Dev-19
Copy link
Contributor

No description provided.

@sczembor
Copy link
Contributor

I don't think these errors has anything to do with the changes you've made

@Megha-Dev-19
Copy link
Contributor Author

@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.?
Thanks

Copy link
Contributor

@sczembor sczembor left a 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.

@Megha-Dev-19
Copy link
Contributor Author

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

Copy link
Contributor

@sczembor sczembor left a 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.

@Megha-Dev-19
Copy link
Contributor Author

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

Copy link
Contributor

@sczembor sczembor left a 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

@Megha-Dev-19 Megha-Dev-19 merged commit a1a1ee6 into develop Oct 28, 2022
@Megha-Dev-19 Megha-Dev-19 deleted the ci-error branch October 28, 2022 04:12
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.

4 participants