newruntime: raising an exception works but currently leaks memory because currentException global is not an 'owned' ref
This commit is contained in:
parent
cb4e04d88e
commit
2846156e13
4 changed files with 60 additions and 6 deletions
|
|
@ -691,6 +691,8 @@ proc genRaiseStmt(p: BProc, t: PNode) =
|
|||
[e, makeCString(typ.sym.name.s),
|
||||
makeCString(if p.prc != nil: p.prc.name.s else: p.module.module.name.s),
|
||||
makeCString(toFileName(p.config, t.info)), rope(toLinenumber(t.info))])
|
||||
if optNimV2 in p.config.globalOptions:
|
||||
lineCg(p, cpsStmts, "$1 = NIM_NIL;$n", [e])
|
||||
else:
|
||||
genLineDir(p, t)
|
||||
# reraise the last exception:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue