[Issue 14465] New: CTFE exception stacktrace shows location of Exception constructor
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 19 11:19:14 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14465
Issue ID: 14465
Summary: CTFE exception stacktrace shows location of Exception
constructor
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
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.
--
More information about the Digitalmars-d-bugs
mailing list