xxxxxxxxxx
void f(T)(int num)
{
import core.stdc.stdio;
printf("recognized %d as %s\n", num, T.stringof.ptr);
}
void main()
{
try
{
throw new Exception("");
}
catch (Exception)
{
f!Exception(1);
}
catch (Throwable)
{
f!Throwable(1);
}
debug
{
try
{
throw new Exception("");
}
catch (Exception)
{
f!Exception(2);
}
catch (Throwable)
{
f!Throwable(2);
}
}
}