Catching wrong sort of Error exception