From 8212ed57941efe6f4c063fcd32789a38103ae2fb Mon Sep 17 00:00:00 2001 From: Konrad Hinsen Date: Tue, 9 Apr 2013 19:50:49 +0200 Subject: [PATCH] Do not quit hy if hy.core.process raises an exception --- bin/hy | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/hy b/bin/hy index 4167e68..2e27f56 100755 --- a/bin/hy +++ b/bin/hy @@ -48,7 +48,12 @@ class HyREPL(code.InteractiveConsole): _machine = Machine(Idle, 1, 0) return True - tokens = process(_machine.nodes) + try: + tokens = process(_machine.nodes) + except Exception: + _machine = Machine(Idle, 1, 0) + self.showtraceback() + return False _machine = Machine(Idle, 1, 0) try: