Exception: Gcloud::Storage::FileVerificationError
- Defined in:
- lib/gcloud/storage/errors.rb
Overview
FileVerificationError
Raised when a File download fails the verification.
Instance Attribute Summary collapse
-
#gcloud_digest ⇒ Object
The value of the digest on the Gcloud file.
-
#local_digest ⇒ Object
The value of the digest on the downloaded file.
-
#type ⇒ Object
The type of digest that failed verification, :md5 or :crc32c.
Class Method Summary collapse
-
.for_crc32c(gcloud_digest, local_digest) ⇒ Object
:nodoc:.
-
.for_md5(gcloud_digest, local_digest) ⇒ Object
:nodoc:.
Instance Attribute Details
#gcloud_digest ⇒ Object
The value of the digest on the Gcloud file.
63 64 65 |
# File 'lib/gcloud/storage/errors.rb', line 63 def gcloud_digest @gcloud_digest end |
#local_digest ⇒ Object
The value of the digest on the downloaded file.
67 68 69 |
# File 'lib/gcloud/storage/errors.rb', line 67 def local_digest @local_digest end |
#type ⇒ Object
The type of digest that failed verification, :md5 or :crc32c.
59 60 61 |
# File 'lib/gcloud/storage/errors.rb', line 59 def type @type end |
Class Method Details
.for_crc32c(gcloud_digest, local_digest) ⇒ Object
:nodoc:
77 78 79 80 81 82 83 |
# File 'lib/gcloud/storage/errors.rb', line 77 def self.for_crc32c gcloud_digest, local_digest #:nodoc: new("The downloaded file failed CRC32c verification.").tap do |e| e.type = :crc32c e.gcloud_digest = gcloud_digest e.local_digest = local_digest end end |
.for_md5(gcloud_digest, local_digest) ⇒ Object
:nodoc:
69 70 71 72 73 74 75 |
# File 'lib/gcloud/storage/errors.rb', line 69 def self.for_md5 gcloud_digest, local_digest #:nodoc: new("The downloaded file failed MD5 verification.").tap do |e| e.type = :md5 e.gcloud_digest = gcloud_digest e.local_digest = local_digest end end |