Skip to content

Commit 5093968

Browse files
committed
move exception handler in eval to properly retain line
1 parent 4db0b1f commit 5093968

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/jvm/clojure/lang/Compiler.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5581,8 +5581,8 @@ public static Object eval(Object form, boolean freshLoader) throws Exception{
55815581
{
55825582
ISeq s = RT.next(form);
55835583
for(; RT.next(s) != null; s = RT.next(s))
5584-
eval(RT.first(s),false);
5585-
return eval(RT.first(s),false);
5584+
eval(RT.first(s), false);
5585+
return eval(RT.first(s), false);
55865586
}
55875587
else if(form instanceof IPersistentCollection
55885588
&& !(RT.first(form) instanceof Symbol
@@ -5599,18 +5599,19 @@ else if(form instanceof IPersistentCollection
55995599
return expr.eval();
56005600
}
56015601
}
5602+
catch(Throwable e)
5603+
{
5604+
if(!(e instanceof CompilerException))
5605+
throw new CompilerException((String) SOURCE.deref(), (Integer) LINE.deref(), e);
5606+
else
5607+
throw (CompilerException) e;
5608+
}
56025609
finally
56035610
{
56045611
Var.popThreadBindings();
56055612
}
56065613
}
5607-
catch(Throwable e)
5608-
{
5609-
if(!(e instanceof CompilerException))
5610-
throw new CompilerException((String) SOURCE.deref(), (Integer) LINE.deref(), e);
5611-
else
5612-
throw (CompilerException) e;
5613-
}
5614+
56145615
finally
56155616
{
56165617
if(createdLoader)

0 commit comments

Comments
 (0)