aqua-playground/aqua/examples/tryCatch.aqua

19 lines
366 B
Plaintext
Raw Normal View History

2021-06-10 17:55:30 +03:00
service Unexisted("unex"):
getStr() -> string
data LastError:
instruction: string
msg: string
peer_id: string
service OpA("op"):
identity(s: string) -> string
func tryCatchTest(node_id: string) -> []string:
on node_id:
f: *string
try:
f <- Unexisted.getStr()
catch err:
f <- OpA.identity(err.msg)
<- f