fixes yet another gensym regression (#12145)
This commit is contained in:
parent
0882a09986
commit
488f3ed085
4 changed files with 34 additions and 10 deletions
|
|
@ -7,4 +7,18 @@ template templ*(): int =
|
|||
bind gx, gy
|
||||
gx + gy
|
||||
|
||||
import json
|
||||
|
||||
const
|
||||
codeField = "foobar"
|
||||
messageField = "more"
|
||||
|
||||
template trap*(path: string, body: untyped): untyped =
|
||||
#bind codeField, messageField
|
||||
try:
|
||||
body
|
||||
except:
|
||||
let msg = getCurrentExceptionMsg()
|
||||
#debug "Error occurred within RPC ", path = path, errorMessage = msg
|
||||
result = %*{codeField: "SERVER_ERROR", messageField: msg}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue