I am new to requireJS and I am trying to understand why I cannot get normal errors.
I use this right after loading the requirejs file, but before loading any modules:
requirejs.onError = function (err) { console.log(err.requireType); if (err.requireType === 'timeout') { console.log('modules: ' + err.requireModules); } throw err; };
But I still get a complete undefined error:
Error: script error http://requirejs.org/docs/errors.html#scripterror @ http://localhost/wampir/lib/require.js:8 "scripterror"
Is there a way to do this to give me the actual error and line number?
I saw this question , but I tried several answers from there, and they do not change anything ...
source share