Exception: ChecksumMismatchError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ChecksumMismatchError
- Defined in:
- Library/Homebrew/exceptions.rb
Overview
Raised by Pathname#verify_checksum when verification fails.
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#hash_type ⇒ Object
readonly
Returns the value of attribute hash_type.
Instance Method Summary collapse
-
#initialize(fn, expected, actual) ⇒ ChecksumMismatchError
constructor
A new instance of ChecksumMismatchError.
Constructor Details
#initialize(fn, expected, actual) ⇒ ChecksumMismatchError
Returns a new instance of ChecksumMismatchError.
598 599 600 601 602 603 604 605 606 607 608 609 |
# File 'Library/Homebrew/exceptions.rb', line 598 def initialize(fn, expected, actual) @expected = expected @hash_type = expected.hash_type.to_s.upcase super <<~EOS #{@hash_type} mismatch Expected: #{expected} Actual: #{actual} Archive: #{fn} To retry an incomplete download, remove the file above. EOS end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected
596 597 598 |
# File 'Library/Homebrew/exceptions.rb', line 596 def expected @expected end |
#hash_type ⇒ Object (readonly)
Returns the value of attribute hash_type
596 597 598 |
# File 'Library/Homebrew/exceptions.rb', line 596 def hash_type @hash_type end |