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

[Feature]: Return Result instead of Panicking in Internal Functions #38

Open
1 task done
0xNeshi opened this issue Feb 6, 2025 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@0xNeshi
Copy link
Collaborator

0xNeshi commented Feb 6, 2025

What is the feature you would like to see?

Many functions internal to motsu panic in certain conditions, causing error handling to be more challenging.
One example of this is that error messages get too long, see #35

The solution is to return Result instead of panicking. That way we make it clear to our future selves which functions can error out, thus avoiding any surprises when invoking them. An extension of this is that we also avoid the need to have to read the func docs to know that it can panic.

Prompted by #31 (comment)

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
@0xNeshi 0xNeshi added the enhancement New feature or request label Feb 6, 2025
@0xNeshi 0xNeshi changed the title [Feature]: Return ArbResult instead of Panicking [Feature]: Return Result instead of Panicking in Internal Functions Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant