diff --git a/Objective-J/Executable.js b/Objective-J/Executable.js index 2793368ff..8a90209f3 100644 --- a/Objective-J/Executable.js +++ b/Objective-J/Executable.js @@ -496,7 +496,10 @@ Executable.fileExecutableSearcherForURL = function(/*CFURL*/ referenceURL) function completed(/*StaticResource*/ aStaticResource) { if (!aStaticResource) - throw new Error("Could not load file at " + aURL); + { + var compilingFileUrl = ObjJCompiler && ObjJCompiler.currentCompileFile ? ObjJCompiler.currentCompileFile : null; + throw new Error("Could not load file at " + aURL + (compilingFileUrl ? " when compiling " + compilingFileUrl : " Martin")); + } cachedFileExecutableSearchResults[cacheUID] = aStaticResource; diff --git a/Objective-J/ObjJCompiler.js b/Objective-J/ObjJCompiler.js index e39354d7a..95c89d3f8 100644 --- a/Objective-J/ObjJCompiler.js +++ b/Objective-J/ObjJCompiler.js @@ -25,6 +25,7 @@ var ObjJCompiler = { }, exports.compileToExecutable = function(/*String*/ aString, /*CFURL*/ aURL, /*unsigned*/ flags) { + ObjJCompiler.currentCompileFile = aURL; return new ObjJCompiler(aString, aURL, flags, 2).executable(); } @@ -35,6 +36,7 @@ exports.compileToIMBuffer = function(/*String*/ aString, /*CFURL*/ aURL, /*unsig exports.compileFileDependencies = function(/*String*/ aString, /*CFURL*/ aURL, /*unsigned*/ flags) { + ObjJCompiler.currentCompileFile = aURL; return new ObjJCompiler(aString, aURL, flags, 1).executable(); } @@ -87,6 +89,7 @@ var ObjJCompiler = function(/*String*/ aString, /*CFURL*/ aURL, /*unsigned*/ fla ObjJCompiler.prototype.compilePass2 = function() { + ObjJCompiler.currentCompileFile = this._URL; this._pass = 2; this._jsBuffer = new StringBuffer(); //print("Start Compile2: " + this._URL);