Open Bug 1179881 Opened 5 years ago Updated Last year

Write a JS error reference

Categories

(Developer Documentation :: JavaScript, defect)

defect
Not set

Tracking

(Not tracked)

People

(Reporter: fscholz, Assigned: fscholz)

References

Details

Current situation:
The web console emits thousands of error messages to web developers everyday. While seasoned web developers understand what is going on, especially beginners need help to understand them. Often the message gets copied, put into google, and answered on Stackoverflow.

Idea:
By adding a [Learn More] link to error messages (like we already do for warnings, see CORS), we offer developers a direct way to get to know more about what just happened.

The error messages to document are in these files:

Web:
JS https://dxr.mozilla.org/mozilla-central/source/js/src/js.msg
DOM https://dxr.mozilla.org/mozilla-central/source/dom/base/domerr.msg
DOM bindings https://dxr.mozilla.org/mozilla-central/source/dom/bindings/Errors.msg 

Internal:
Ctypes https://dxr.mozilla.org/mozilla-central/source/js/src/ctypes/ctypes.msg
XPC https://dxr.mozilla.org/mozilla-central/source/js/xpconnect/src/xpc.msg

We would create a separate page for them like so:
https://developer.mozilla.org/docs/Web/JavaScript/Errors/JSMSG_BAD_RADIX


More info: https://etherpad.mozilla.org/webconsole-mdn-error-msg
Discussion: https://groups.google.com/forum/#!topic/mozilla.dev.developer-tools/zUiTSyjIvOs
Around 35 error doc links have landed in Firefox 49. I will watch more telemetry data and pitch in the MDN team to get more time for writing more docs here. Meanwhile, we also published a post about this feature: https://hacks.mozilla.org/2016/06/helping-web-developers-with-javascript-errors/
can this status be updated to in progress or something? I'm already seeing learn more links for some errors (but not all, see https://bugzilla.mozilla.org/show_bug.cgi?id=1456933)
For the record, nbp did this page: https://nbp.github.io/arewedocumentedyet/ which lists errors in Fx code vs. MDN (non-)existing pages
You need to log in before you can comment on or make changes to this bug.