mirror of
https://review.haiku-os.org/buildtools
synced 2025-02-12 00:37:41 +01:00
20 lines
310 B
D
20 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");
|
|
}
|