diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-01-01 19:54:19 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-01-01 19:54:19 +0000 |
commit | c78855af24bd4cc2f9895d8b2dc4a7fced8453f3 (patch) | |
tree | 5e5d7724acb7038b15daebc3a7c79ed079b14d22 /src | |
parent | 06f5b521d953c311ee258e00adc1f08f306f41ed (diff) |
enable eval of throw to throw Errors as well as Exceptions
Diffstat (limited to 'src')
-rw-r--r-- | src/jvm/clojure/lang/Compiler.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jvm/clojure/lang/Compiler.java b/src/jvm/clojure/lang/Compiler.java index c43b4d5e..799c2aaa 100644 --- a/src/jvm/clojure/lang/Compiler.java +++ b/src/jvm/clojure/lang/Compiler.java @@ -1464,7 +1464,11 @@ static class ThrowExpr extends UntypedExpr{ public Object eval() throws Exception{ - throw (Exception) excExpr.eval(); + Object t = excExpr.eval(); + if(t instanceof Exception) + throw (Exception) t; + else + throw (Error) t; } public void emit(C context, FnExpr fn, GeneratorAdapter gen){ |