diff options
author | flywind <xzsflywind@gmail.com> | 2021-06-02 00:16:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 18:16:25 +0200 |
commit | c2e3dc0ed16a854981769b426e9e327663447df7 (patch) | |
tree | 9bf99b1fd1fbddd25cf2972146000d29a012d089 /tests | |
parent | c0e8199acc9f49caa36bae34d103600d112b66f3 (diff) | |
download | Nim-c2e3dc0ed16a854981769b426e9e327663447df7.tar.gz |
close #18129 Add setCurrentException for JS backend (#18145)
* [std/re] make interface consistent * tiny * revert * close #18129 add setCurrentException * changelog entry
Diffstat (limited to 'tests')
-rw-r--r-- | tests/exception/tsetexceptions.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/exception/tsetexceptions.nim b/tests/exception/tsetexceptions.nim new file mode 100644 index 000000000..557fc1898 --- /dev/null +++ b/tests/exception/tsetexceptions.nim @@ -0,0 +1,8 @@ +discard """ + targets: "c cpp js" +""" + +let ex = newException(CatchableError, "test") +setCurrentException(ex) +doAssert getCurrentException().msg == ex.msg +doAssert getCurrentExceptionMsg() == ex.msg |