catching codeclimate exception