For the overwhelming majority of users, scripts are minified, rendering error locations mostly useless. Investigate the use of [[ http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ | source maps ]] to retrieve the original locations.
- make the minifier emit source maps (or consider replacing it with another minifier, which might be the easier way of doing this - several minifiers, e.g. [[ https://github.com/mishoo/UglifyJS2/ | UglifyJS ]], support source map generation)
- add source map support to ResourceLoader ([[ https://bugzilla.wikimedia.org/show_bug.cgi?id=45514 | bug 45514 ]]) - note that RL wraps scripts with some custom JS, so source maps need to be adjusted
This might well turn out to be outside the expertise or resource limitations of the Multimedia team, in which case we should try to find an owner for this task. If that doesn't work, consider a fallback solution:
- use the wrapper described in T513 do identify the file which the error originates from