diff options
author | bptato <nincsnevem662@gmail.com> | 2023-05-09 12:34:58 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-05-09 12:34:58 +0200 |
commit | 87f9bd656b2a8a8d4ebd029ba6a78f1dc93558eb (patch) | |
tree | c3b7e4f3500512baef2064986cfdf5701c988e29 /src/main.nim | |
parent | e0a8b27068ac8fc61a243bae685c23a14976f619 (diff) | |
download | chawan-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.nim | 7 |
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 |