fixes #3546
This commit is contained in:
parent
2f07ac785f
commit
1757b8466d
1 changed files with 5 additions and 2 deletions
|
|
@ -255,9 +255,12 @@ proc cleanUpOnException(c: PCtx; tos: PStackFrame):
|
|||
nextExceptOrFinally = pc2 + c.code[pc2].regBx - wordExcess
|
||||
inc pc2
|
||||
while c.code[pc2].opcode == opcExcept:
|
||||
let exceptType = c.types[c.code[pc2].regBx-wordExcess].skipTypes(
|
||||
let excIndex = c.code[pc2].regBx-wordExcess
|
||||
let exceptType = if excIndex > 0: c.types[excIndex].skipTypes(
|
||||
abstractPtrs)
|
||||
if inheritanceDiff(exceptType, raisedType) <= 0:
|
||||
else: nil
|
||||
#echo typeToString(exceptType), " ", typeToString(raisedType)
|
||||
if exceptType.isNil or inheritanceDiff(exceptType, raisedType) <= 0:
|
||||
# mark exception as handled but keep it in B for
|
||||
# the getCurrentException() builtin:
|
||||
c.currentExceptionB = c.currentExceptionA
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue