Ticket #5398: loadererror.patch
| File loadererror.patch, 1.5 kB (added by jburke, 5 months ago) |
|---|
-
_firebug/firebug.js
35 35 console.debug(message); 36 36 } 37 37 38 dojo.loaderParseError = function(/*String*/url, /*Object*/error){ 39 //summary: handles cases when the XHR-loaded, evaled module file fails. 40 //Attach a script node so browser reports the error line correctly. 41 42 var s = dojo.doc.createElement("script"); 43 s.type = "text/javascript"; 44 s.src = url; 45 var head = dojo.doc.getElementsByTagName("head")[0]; 46 if(!head){ 47 //Some HTML4 cases in some browsers do not have head element. 48 head = document.getElementsByTagName("html")[0]; 49 } 50 head.appendChild(s); 51 } 52 38 53 // FIREBUG LITE 39 54 // summary: Firebug Lite, the baby brother to Joe Hewitt's Firebug for Mozilla Firefox 40 55 // description: -
_base/_loader/loader.js
108 108 //it is most likely the i18n bundle stuff. 109 109 contents = this._scopePrefix + contents + this._scopeSuffix; 110 110 } 111 var value = d["eval"](contents+"\r\n//@ sourceURL="+uri); 111 112 try{ 113 var value = d["eval"](contents+"\r\n//@ sourceURL="+uri); 114 }catch(e){ 115 if(d.loaderParseError){ 116 d.loaderParseError(uri, e); 117 }else{ 118 throw e; 119 } 120 } 112 121 if(cb){ cb(value); } 113 122 return true; // Boolean 114 123 }