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

Support errors.Is and errors.As in the standard gno errors package #486

Open
zivkovicmilos opened this issue Jan 26, 2023 · 5 comments
Open
Labels
help wanted Want to contribute? We recommend these issues.

Comments

@zivkovicmilos
Copy link
Member

Description

Currently, the only way to compare errors in .gno packages is to use the equals operator ==, as users are limited to the standard errors package.

Gno should support other useful methods from the Go standard errors library, like errors.Is and errors.As, because it makes it easy to do error comparisons and brings it closer to idiomatic Go.

@moul
Copy link
Member

moul commented Jan 26, 2023

Related to #239

@moul
Copy link
Member

moul commented Jan 26, 2023

Btw, you don't need to wait for #239 to be done to just port those missing helpers.
Feel free to open a PR.

@zivkovicmilos
Copy link
Member Author

Closed as part of some @moul PR 🙏

@thehowl
Copy link
Member

thehowl commented Sep 12, 2024

Nope, doesn't exist yet:

https://github.com/gnolang/gno/blob/master/gnovm/stdlibs/errors/errors.gno

@thehowl thehowl reopened this Sep 12, 2024
@zivkovicmilos
Copy link
Member Author

@thehowl

Ah, it was part of the uassert / urequire packages 👍

@zivkovicmilos zivkovicmilos added help wanted Want to contribute? We recommend these issues. and removed help wanted labels Sep 12, 2024
@wyhaines wyhaines added the hacktoberfest This might be a good issue for a hacktoberfest participant to handle. label Oct 1, 2024
@wyhaines wyhaines removed the hacktoberfest This might be a good issue for a hacktoberfest participant to handle. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Want to contribute? We recommend these issues.
Projects
Status: Triage
Development

No branches or pull requests

5 participants