diff options
| author | Misty De Meo | 2013-05-20 19:35:07 -0500 | 
|---|---|---|
| committer | Misty De Meo | 2013-05-20 23:25:15 -0500 | 
| commit | 4fdbb2d685d1c20e84d1d31bc50f638aa1a800e1 (patch) | |
| tree | 92db9a493393ad657ee0293fc7a520352ce03200 /Library/Homebrew/exceptions.rb | |
| parent | c9ce32d0f1ac550a25153b376c6584e5d7004a85 (diff) | |
| download | brew-4fdbb2d685d1c20e84d1d31bc50f638aa1a800e1.tar.bz2 | |
CompilerSelector: raise when no compatible compiler
This replaces the old behaviour of falling back to the original
compiler with no messaging.
Fixes Homebrew/homebrew#19170.
Fixes mistydemeo/tigerbrew#45.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 4f1fafdce..0dbdb8b1d 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -160,6 +160,26 @@ class BuildError < Homebrew::InstallationError    end  end +# raised by CompilerSelector if the formula fails with all of +# the compilers available on the user's system +class CompilerSelectionError < StandardError +  def message +    if MacOS.version > :tiger then <<-EOS.undent +      This formula cannot be built with any available compilers. +      To install this formula, you may need to: +        brew tap homebrew/dupes +        brew install apple-gcc42 +      EOS +    # tigerbrew has a separate apple-gcc42 for Xcode 2.5 +    else <<-EOS.undent +      This formula cannot be built with any available compilers. +      To install this formula, you need to: +        brew install apple-gcc42 +      EOS +    end +  end +end +  # raised in CurlDownloadStrategy.fetch  class CurlDownloadStrategyError < RuntimeError  end  | 
