Added ML style functional exception handling.

Using the new "ifThrown" function in the std.exception module.