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

Errors #583

Open
penelopeysm opened this issue Feb 7, 2025 · 0 comments
Open

Errors #583

penelopeysm opened this issue Feb 7, 2025 · 0 comments

Comments

@penelopeysm
Copy link
Member

penelopeysm commented Feb 7, 2025

One element of docs I've seen that is very helpful goes something like this:

When you get an error with a library, often the best way to figure out what went wrong is to copy paste the error message into Google and pray that somebody else has run into the same problem before. (obligatory https://xkcd.com/979/)

The most helpful libraries tend to have error codes which link to specific docs pages that tell you (1) why these errors happened; (2) an MWE that triggers the same error; (3) how to fix the MWE; (4) possible further reading e.g. related github issues.

Not only is this a top tier user experience, it means that as a developer you don't have to worry about cramming a lot of explanation into a string in the source code / how to cut error messages down so that it's short without making it useless in the process.

See e.g. the Rust compiler https://doc.rust-lang.org/error_codes/error-index.html for a stellar example of this

There is a similar effort going on with the Haskell compiler https://errors.haskell.org/

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