-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
error code #'s #6386
Comments
Improving error messages and even adding doc links is great, but assigning unique codes to each just strikes me as a tedious and unnecessary burden. Error messages that are very tricky should just be longer and more descriptive. |
i wanted to use the codes as a way of reducing the tedium of making doc links. perhaps the text itself is enough to cross-reference to the docs, but what if you wanted to update the text? while writing twitter-worthy error messages sounds like a great goal, i'm pretty bad at it. writing a paragraph (with the added benefit of having room for examples) seemed like a worthwhile tradeoff. how would we go about this? lookup table in showerror that adds a hyperlink? hyperlink to where, RTD? |
Not orthogonal to #5694 and related error reporting issues like #4744, #4836, etc. It will be particularly challenging to implement this proposal for a centralized table of error codes when the errors are thrown by underlying libraries like |
I guess this would effectively assign unique codes to each error type |
Uh, that's not the same as assigning a numeric code to every error. |
a type pointer is sort of like a unique numeric code, no? |
But there isn't a different type for every error message; you group the errors into a reasonable number of exception types. See for example python's exception hierarchy. Further distinguishing errors is not what I'm against; here I'm really just against the idea of numeric codes specifically. Everything in a computer is numbers underneath, so that's clearly not what I'm talking about. |
I am also for a better exception hierarchy instead of error codes. This is how it works in Java and C# and it actually works quite well to localize bugs. I have seen C code that did arithmetics on error codes (to look if the error is in a certain range) and this was just scary... |
Hmm... I know this was closed a year ago, but there is an argument for using error codes (not necessarily centralized error codes) that was not raised... the ability to have locale specific messages. |
Proposal: add error codes to all julia internal error messages which can be cross-referenced against an extended documentation page that describes each error, giving more verbose descriptions, examples, gotchas, and solutions
The text was updated successfully, but these errors were encountered: