fixes #1473
This commit is contained in:
parent
2d43fcafe0
commit
b2f577df23
9 changed files with 104 additions and 26 deletions
|
|
@ -44,6 +44,10 @@ template wrap2svoid(op) {.immediate, dirty.} =
|
|||
op(getString(a, 0), getString(a, 1))
|
||||
systemop op
|
||||
|
||||
proc getCurrentExceptionMsgWrapper(a: VmArgs) {.nimcall.} =
|
||||
setResult(a, if a.currentException.isNil: ""
|
||||
else: a.currentException.sons[2].strVal)
|
||||
|
||||
proc registerAdditionalOps*(c: PCtx) =
|
||||
wrap1f(sqrt)
|
||||
wrap1f(ln)
|
||||
|
|
@ -73,3 +77,4 @@ proc registerAdditionalOps*(c: PCtx) =
|
|||
wrap1s(dirExists)
|
||||
wrap1s(fileExists)
|
||||
wrap2svoid(writeFile)
|
||||
systemop getCurrentExceptionMsg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue