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

Why panic when you can Result #84

Open
rsheeter opened this issue Jan 11, 2023 · 0 comments
Open

Why panic when you can Result #84

rsheeter opened this issue Jan 11, 2023 · 0 comments

Comments

@rsheeter
Copy link
Contributor

As https://github.com/googlefonts/fontmake-rs/pull/79/files/8c03ae050bb29a9552c94a7d0cb9b165600ab668#r1066299668 suggests, we have accumulated a number of panic or known to be fallible unwrap cases we probably want to make into errors.

"probably" because panic has one really nice characteristic: you get a useful callstack. Tracking down problems from errors seems to be less convenient. Perhaps that means error should https://doc.rust-lang.org/std/backtrace/struct.Backtrace.html#method.capture?

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

No branches or pull requests

1 participant