Perform lambda lifting for compile-time stuff when targeting JS. Enable unittest test.
This commit is contained in:
parent
d270c8ebe8
commit
c5f7d553e9
3 changed files with 10 additions and 10 deletions
|
|
@ -99,8 +99,9 @@ template test*(name: expr, body: stmt): stmt {.immediate, dirty.} =
|
|||
body
|
||||
|
||||
except:
|
||||
checkpoint("Unhandled exception: " & getCurrentExceptionMsg())
|
||||
echo getCurrentException().getStackTrace()
|
||||
when not defined(js):
|
||||
checkpoint("Unhandled exception: " & getCurrentExceptionMsg())
|
||||
echo getCurrentException().getStackTrace()
|
||||
fail()
|
||||
|
||||
finally:
|
||||
|
|
@ -114,9 +115,7 @@ proc checkpoint*(msg: string) =
|
|||
template fail* =
|
||||
bind checkpoints
|
||||
for msg in items(checkpoints):
|
||||
# this used to be 'echo' which now breaks due to a bug. XXX will revisit
|
||||
# this issue later.
|
||||
stdout.writeln msg
|
||||
echo msg
|
||||
|
||||
when not defined(ECMAScript):
|
||||
if abortOnError: quit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue