Checks that the `error` field is really and `error` type.

It would be very unfortunate if the exception/panic handler would itself panic because it asserts a type.

r: @Sirupsen, @shuhaowu, @eapache