Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libphobos/testsuite/libphobos.exceptions/line_trace.d
2023-03-06 14:48:14 +01:00

19 lines
310 B
D

// { dg-output "object.Exception@.*: exception" }
void main()
{
try
{
f1();
}
catch (Exception e)
{
import core.stdc.stdio;
auto str = e.toString();
printf("%.*s\n", cast(int)str.length, str.ptr);
}
}
void f1()
{
throw new Exception("exception");
}