summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-02-09 17:24:37 +0000
committerRich Hickey <richhickey@gmail.com>2009-02-09 17:24:37 +0000
commitc68fe476441fed71c2788a284f1c3081813502f6 (patch)
tree169e21e342fc333962fb600ae5e11788eedca504
parent3586754272ab23f014acf5f3aab3e8ce8202fc00 (diff)
clojure.main should not exit if there was an exception in an --init file
and the user requested a repl, patch from arohner
-rw-r--r--src/clj/clojure/main.clj6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/clj/clojure/main.clj b/src/clj/clojure/main.clj
index fa869e64..744ac0da 100644
--- a/src/clj/clojure/main.clj
+++ b/src/clj/clojure/main.clj
@@ -136,7 +136,11 @@
caught #(.println *err* (repl-exception %))}}
(apply hash-map options)]
(with-bindings
- (init)
+ (try
+ (init)
+ (catch Throwable e
+ (caught e)
+ (set! *e e)))
(prompt)
(flush)
(loop [where (skip-whitespace *in*)]