Catch errors.