Module: VCR::Cassette::EncodingErrorHandling

Included in:
Serializers::JSON, Serializers::Psych, Serializers::Syck, Serializers::YAML
Defined in:
lib/vcr/cassette/serializers.rb

Instance Method Summary collapse

Instance Method Details

#handle_encoding_errorsObject



50
51
52
53
54
55
# File 'lib/vcr/cassette/serializers.rb', line 50

def handle_encoding_errors
  yield
rescue *self::ENCODING_ERRORS => e
  e.message << "\nNote: Using VCR's `:preserve_exact_body_bytes` option may help prevent this error in the future."
  raise
end