summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Rohner <arohner@gmail.com>2010-03-23 12:09:40 -0500
committerStuart Halloway <stu@thinkrelevance.com>2010-10-11 09:20:07 -0400
commit2230a91829f39b72973e6fecf275d9c664911ca0 (patch)
treeb76e8d0011424f93b99a6e9260f19f978f99f079
parent0456649282c4e3f298a5c75af2f979b8001e977a (diff)
Print SOURCE_PATH rather than SOURCE on exception, so it's easier to discover the file with an error when two files have the same name in different directories.
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r--src/jvm/clojure/lang/Compiler.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java
index bc19538a..1eaa9e81 100644
--- a/src/jvm/clojure/lang/Compiler.java
+++ b/src/jvm/clojure/lang/Compiler.java
@@ -5774,7 +5774,7 @@ private static Expr analyze(C context, Object form, String name) throws Exceptio
catch(Throwable e)
{
if(!(e instanceof CompilerException))
- throw new CompilerException((String) SOURCE.deref(), (Integer) LINE.deref(), e);
+ throw new CompilerException((String) SOURCE_PATH.deref(), (Integer) LINE.deref(), e);
else
throw (CompilerException) e;
}
@@ -5947,7 +5947,7 @@ private static Expr analyzeSeq(C context, ISeq form, String name) throws Excepti
catch(Throwable e)
{
if(!(e instanceof CompilerException))
- throw new CompilerException((String) SOURCE.deref(), (Integer) LINE.deref(), e);
+ throw new CompilerException((String) SOURCE_PATH.deref(), (Integer) LINE.deref(), e);
else
throw (CompilerException) e;
}
@@ -6434,7 +6434,7 @@ public static Object load(Reader rdr, String sourcePath, String sourceName) thro
}
catch(LispReader.ReaderException e)
{
- throw new CompilerException(sourceName, e.line, e.getCause());
+ throw new CompilerException(sourcePath, e.line, e.getCause());
}
finally
{
@@ -6653,7 +6653,7 @@ public static Object compile(Reader rdr, String sourcePath, String sourceName) t
}
catch(LispReader.ReaderException e)
{
- throw new CompilerException(sourceName, e.line, e.getCause());
+ throw new CompilerException(sourcePath, e.line, e.getCause());
}
finally
{