xxxxxxxxxx
import std.stdio;
class InnerException : Exception
{
string fuckyou = "Fuck off and die."; // XXX NEVER PRINT THIS
this() { super("Inner"); }
}
class OuterException : Exception
{
string helloworld = "Hello World";
this() { super("Outer"); }
}
void foo() {
try throw new InnerException;
catch (InnerException ex) { return; }
// print friendly "hello world" message
catch (OuterException ex) { writefln("%s", ex.helloworld); }
}
void main() {
try throw new OuterException;
finally foo();
}