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



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

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