aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 2b7f6542c..431d89dfd 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -158,15 +158,17 @@ class ChecksumMismatchError < RuntimeError
attr :advice, true
attr :expected
attr :actual
+ attr :hash_type
def initialize expected, actual
@expected = expected
@actual = actual
+ @hash_type = expected.hash_type.to_s.upcase
super <<-EOS.undent
- #{expected.hash_type.to_s.upcase} mismatch
- Expected: #{expected}
- Actual: #{actual}
+ #{@hash_type} mismatch
+ Expected: #{@expected}
+ Actual: #{@actual}
EOS
end