catch error and abort