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

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