mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 01:18:02 +00:00
Better error message when importing file that is not found
This commit is contained in:
1 parent
227c696750
commit
26be5bf264
2 files changed
+7
-1
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user