Update exception handling with custom types, Ticket #216