json_translater: catch better

This commit is contained in:
Emery Hemingway 2023-07-26 09:45:58 +01:00
parent 818c23f025
commit c65fcc27ed
2 changed files with 5 additions and 7 deletions

View File

@ -18,9 +18,8 @@ proc runChild: string =
cmd = params[0]
args = params[1..params.high]
try: result = execProcess(command=cmd, args=args, options={poUsePath})
except:
stderr.writeLine "execProcess failed"
quit 1
except CatchableError as err:
quit("execProcess failed: " &err.msg)
if result == "":
stderr.writeLine "no ouput"
quit 1
@ -28,9 +27,8 @@ proc runChild: string =
proc translate(output: string): Assertion =
var js: JsonNode
try: js = parseJson output
except CatchableError:
stderr.writeLine "parseJson failed"
quit 1
except CatchableError as err:
quit("parseJson failed: " &err.msg)
js.toPreserveHook(Ref)
runActor("main") do (root: Ref; turn: var Turn):

View File

@ -1,6 +1,6 @@
# Package
version = "20230701"
version = "20230726"
author = "Emery Hemingway"
description = "Utilites for Syndicated Actors and Synit"
license = "unlicense"