summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-03-04 19:26:15 +0000
committerRich Hickey <richhickey@gmail.com>2008-03-04 19:26:15 +0000
commit99d9d2da0a3363c56714a6c44844f7e90ca2601e (patch)
tree80afa431ffbca5c4c988cc6b6fe89326846e5a84 /src
parent1a399df8f3f3bcb9d3a92a584fa9714832ab550f (diff)
fixed bug with nested try blocks
Diffstat (limited to 'src')
-rw-r--r--src/jvm/clojure/lang/Compiler.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java
index c7ebc814..78339688 100644
--- a/src/jvm/clojure/lang/Compiler.java
+++ b/src/jvm/clojure/lang/Compiler.java
@@ -1439,10 +1439,7 @@ static class TryExpr implements Expr{
CatchClause clause = (CatchClause) catchExprs.nth(i);
clause.label = gen.newLabel();
clause.endLabel = gen.newLabel();
- gen.visitTryCatchBlock(startTry, endTry, clause.label, clause.c.getName().replace('.', '/'));
}
- if(finallyExpr != null)
- gen.visitTryCatchBlock(startTry, endTry, finallyLabel, null);
gen.mark(startTry);
tryExpr.emit(context, fn, gen);
@@ -1476,6 +1473,13 @@ static class TryExpr implements Expr{
for(int i = 0; i < catchExprs.count(); i++)
{
CatchClause clause = (CatchClause) catchExprs.nth(i);
+ gen.visitTryCatchBlock(startTry, endTry, clause.label, clause.c.getName().replace('.', '/'));
+ }
+ if(finallyExpr != null)
+ gen.visitTryCatchBlock(startTry, endTry, finallyLabel, null);
+ for(int i = 0; i < catchExprs.count(); i++)
+ {
+ CatchClause clause = (CatchClause) catchExprs.nth(i);
gen.visitLocalVariable(clause.lb.name, "Ljava/lang/Object;", null, clause.label, clause.endLabel,
clause.lb.idx);
}