Nested error handlers

In my opionion, this is a better way of doing this, but it still
doesn't work completely