Bug 14465 – CTFE exception stacktrace shows location of Exception constructor

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-04-19T18:19:00Z
Last change time
2015-06-17T21:04:53Z
Keywords
pull
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2015-04-19T18:19:14Z
cat > bug.d << CODE class E : Exception { this(string msg) { super(msg); } } bool foo() { throw new E("message"); } static assert(foo()); CODE dmd -c bug ---- bug.d(5): Error: uncaught CTFE exception bug.E("message") bug.d(11): thrown from here bug.d(14): called from here: foo() bug.d(14): while evaluating: static assert(foo()) ---- The first line shouldn't be present in the stacktrace, b/c that's code constructing the exception, which happens before the exception is thrown.
Comment #1 by r.sagitario — 2015-04-19T19:21:55Z
Comment #2 by github-bugzilla — 2015-04-20T15:15:09Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/312a931d03d119fa6e6af4099b5fb1beb0d71ebc Merge pull request #4599 from rainers/fix14465 fix Issue 14465 - CTFE exception stacktrace shows location of Exception constructor
Comment #3 by github-bugzilla — 2015-06-17T21:04:53Z