You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a general discussion issue to get some conversation on the topic, not an error message itself.
I am wondering how we would define a good error message. I have a couple of ideas:
relationship to the source code - a good error message would clearly show its relationship to the source code as it was written.
Error in relation to intended code - sometimes it is hard to tell exactly what the programmers intent was, but the closer the error message is to the intention, the more useful it is.
suggestions on how to fix - maybe we can give tips on where the problem is likely coming from?
Those are some initial thoughts. Let me know what you folks think.
Do you agree to license your suggested error message under an MIT-style license?
Yes
The text was updated successfully, but these errors were encountered:
Any error in JavaScript can be boiled down to an assumption of the program being broken in a critical way:
in nullish reference errors, the assumption is that the value's properties can be dereferenced (nullish values are the only ones for which this isn't the case);
in syntax errors, the input is assumed to be a source code parseable under the syntax rules;
in type errors, the value type is assumed to be assignable to a certain given one; etc.
An error message should include this information. When this is occasionally done, it is usually done with a phrase like expected <one thing>, instead got <another thing>.
This is a general discussion issue to get some conversation on the topic, not an error message itself.
I am wondering how we would define a good error message. I have a couple of ideas:
relationship to the source code - a good error message would clearly show its relationship to the source code as it was written.
Error in relation to intended code - sometimes it is hard to tell exactly what the programmers intent was, but the closer the error message is to the intention, the more useful it is.
suggestions on how to fix - maybe we can give tips on where the problem is likely coming from?
Those are some initial thoughts. Let me know what you folks think.
Do you agree to license your suggested error message under an MIT-style license?
Yes
The text was updated successfully, but these errors were encountered: