Index: _firebug/firebug.js
===================================================================
--- _firebug/firebug.js	(revision 12226)
+++ _firebug/firebug.js	(working copy)
@@ -35,6 +35,21 @@
 	console.debug(message);
 }
 
+dojo.loaderParseError = function(/*String*/url, /*Object*/error){
+	//summary: handles cases when the XHR-loaded, evaled module file fails.
+	//Attach a script node so browser reports the error line correctly.
+	
+	var s = dojo.doc.createElement("script");
+	s.type = "text/javascript";
+	s.src = url;
+	var head = dojo.doc.getElementsByTagName("head")[0];
+	if(!head){
+		//Some HTML4 cases in some browsers do not have head element.
+		head = document.getElementsByTagName("html")[0];
+	}
+	head.appendChild(s);
+}
+
 // FIREBUG LITE
 	// summary: Firebug Lite, the baby brother to Joe Hewitt's Firebug for Mozilla Firefox
 	// description:
Index: _base/_loader/loader.js
===================================================================
--- _base/_loader/loader.js	(revision 12237)
+++ _base/_loader/loader.js	(working copy)
@@ -108,7 +108,16 @@
 			//it is most likely the i18n bundle stuff.
 			contents = this._scopePrefix + contents + this._scopeSuffix;
 		}
-		var value = d["eval"](contents+"\r\n//@ sourceURL="+uri);
+
+		try{
+			var value = d["eval"](contents+"\r\n//@ sourceURL="+uri);
+		}catch(e){
+			if(d.loaderParseError){
+				d.loaderParseError(uri, e);
+			}else{
+				throw e;
+			}
+		}
 		if(cb){ cb(value); }
 		return true; // Boolean
 	}
