Opened 3 years ago
#19095 new defect
dojo-loader doesn't fire "error" event for syntax-errors in modules
Reported by: | gerhard presser | Owned by: | mikeb |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Accessibility | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I'm using require.on("error", function()...}); to provide some feedback for the user.
If the module cannot be found I get an exception. If the module contains syntax errors, the event isn't dispatched. Instead I get following exceptions in the console
MyModule.js?en-us_9.0_ea01c3be6cc73d7745e43bbd59dd6810_Europe/Berlin:5 Uncaught ReferenceError: asdfasfd is not defined at MyModule.js?en-us_9.0_ea01c3be6cc73d7745e43bbd59dd6810_Europe/Berlin:5 dojo.js.uncompressed.js:1323 Uncaught TypeError: MyModule is not a constructor at MyOtherModule.js?en-us_9.0_ea01c3be6cc73d7745e43bbd59dd6810_Europe/Berlin:64 at runFactory (dojo.js.uncompressed.js:1177) at execModule (dojo.js.uncompressed.js:1305) at dojo.js.uncompressed.js:1343 at guardCheckComplete (dojo.js.uncompressed.js:1320) at checkComplete (dojo.js.uncompressed.js:1338) at onLoadCallback (dojo.js.uncompressed.js:1505) at HTMLScriptElement.onLoad (dojo.js.uncompressed.js:1758)
Note: See
TracTickets for help on using
tickets.