diff options
author | cooldome <cdome@bk.ru> | 2018-10-28 12:40:42 +0000 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-28 13:40:42 +0100 |
commit | dfb8730f51a022ff02bdd973e6c5946cfdcdc3c6 (patch) | |
tree | 41ee6f51c072825cd35e19805ffd62d2f502afde /compiler | |
parent | f670c55daa3fdad32c02b9c1f0ec0d9031adee62 (diff) | |
download | Nim-dfb8730f51a022ff02bdd973e6c5946cfdcdc3c6.tar.gz |
Implements #9434. Minimal Stacktrace for Exceptions in release mode (#9480)
* Fixes #9434
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ccgstmts.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 7905d3daf..5ebe0323d 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -608,8 +608,10 @@ proc genRaiseStmt(p: BProc, t: PNode) = if isImportedException(typ, p.config): lineF(p, cpsStmts, "throw $1;$n", [e]) else: - lineCg(p, cpsStmts, "#raiseException((#Exception*)$1, $2);$n", - [e, makeCString(typ.sym.name.s)]) + lineCg(p, cpsStmts, "#raiseExceptionEx((#Exception*)$1, $2, $3, $4, $5);$n", + [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))]) else: genLineDir(p, t) # reraise the last exception: |