diff options
| author | Xu Cheng | 2015-07-23 14:09:32 +0800 | 
|---|---|---|
| committer | Xu Cheng | 2015-07-24 15:59:28 +0800 | 
| commit | b1fff3205584e1e42ae750b2af7ca17963929aa9 (patch) | |
| tree | 99b9afbc2a2d71a3a3dbd5a4aa5c06796c7a3f2e /Library/Homebrew/exceptions.rb | |
| parent | 602ea66a0f6e8933fea00ad558390c50f52848ca (diff) | |
| download | brew-b1fff3205584e1e42ae750b2af7ca17963929aa9.tar.bz2 | |
BottleLoader: check version mismatch
Closes Homebrew/homebrew#42049.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 59a374535..35dca72ac 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -301,3 +301,13 @@ class DuplicateResourceError < ArgumentError      super "Resource #{resource.inspect} is defined more than once"    end  end + +class BottleVersionMismatchError < RuntimeError +  def initialize bottle_file, bottle_version, formula, formula_version +    super <<-EOS.undent +      Bottle version mismatch +      Bottle: #{bottle_file} (#{bottle_version}) +      Formula: #{formula.full_name} (#{formula_version}) +    EOS +  end +end  | 
