Revert "system/excpt: check if the exception is not nil before pop (#18247)" (#18265)

This reverts commit 0adb47aa15.
This commit is contained in:
Andreas Rumpf
2021-06-17 08:20:10 +02:00
committed by GitHub
parent 969cb97c0a
commit fd8b79707c
2 changed files with 2 additions and 10 deletions

View File

@@ -135,9 +135,8 @@ proc pushCurrentException(e: sink(ref Exception)) {.compilerRtl, inl.} =
#showErrorMessage2 "A"
proc popCurrentException {.compilerRtl, inl.} =
if currException != nil:
currException = currException.up
#showErrorMessage2 "B"
currException = currException.up
#showErrorMessage2 "B"
proc popCurrentExceptionEx(id: uint) {.compilerRtl.} =
discard "only for bootstrapping compatbility"

View File

@@ -6,10 +6,3 @@ let ex = newException(CatchableError, "test")
setCurrentException(ex)
doAssert getCurrentException().msg == ex.msg
doAssert getCurrentExceptionMsg() == ex.msg
setCurrentException(nil)
try:
raise newException(CatchableError, "test2")
except:
setCurrentException(nil)
doAssert getCurrentException() == nil