Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16751 closed defect (fixed)

dojo/ready is hiding errors

Reported by: cjolif Owned by: Rawld Gill
Priority: high Milestone: 1.9
Component: Loader Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

If you run

<html>
<head>
  <script type="text/javascript" src="../dojo.js" 
       data-dojo-config="async: true"></script>
  <script type="text/javascript">
	require(["dojo/ready"], function(ready){
  	  ready(function(){
		throw new Error("my error");
	  })
	});
  </script>
</head>
<body>
</body>
</html>

you will see no error in the console.

Attachments (1)

16751.patch (491 bytes) - added by cjolif 7 years ago.
possible patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by cjolif

Priority: undecidedhigh

ready.js is explicitly catching and not reporting with a FIXME:

try{
  f();
}catch(e){
  // FIXME: signal the error via require.on
}

Changed 7 years ago by cjolif

Attachment: 16751.patch added

possible patch

comment:2 Changed 7 years ago by cjolif

Milestone: tbd1.9

comment:3 Changed 7 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [30701]:

don't silently squelch caught errors when running the dojo ready queue; fixes #16751; thanks cjolif

comment:4 Changed 7 years ago by Rawld Gill

In [30702]:

fix whitespace ; refs #16751

Note: See TracTickets for help on using tickets.