about summary refs log tree commit diff stats
path: root/src/main.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-05-09 12:34:58 +0200
committerbptato <nincsnevem662@gmail.com>2023-05-09 12:34:58 +0200
commit87f9bd656b2a8a8d4ebd029ba6a78f1dc93558eb (patch)
treec3b7e4f3500512baef2064986cfdf5701c988e29 /src/main.nim
parente0a8b27068ac8fc61a243bae685c23a14976f619 (diff)
downloadchawan-87f9bd656b2a8a8d4ebd029ba6a78f1dc93558eb.tar.gz
Improve debugging, reduce crashes
Loader no longer dies when not everything is read from the stream.
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.nim b/src/main.nim
index 7786909e..a0a6b064 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -124,4 +124,9 @@ conf.nmap = constructActionTable(conf.nmap)
 conf.lemap = constructActionTable(conf.lemap)
 disp.forkserver.loadForkServerConfig(conf)
 
-newClient(conf, disp).launchClient(pages, ctype, dump)
+let c = newClient(conf, disp)
+try:
+  c.launchClient(pages, ctype, dump)
+except CatchableError:
+  c.flushConsole()
+  raise