aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/global.rb
diff options
context:
space:
mode:
authorMax Howell2009-11-05 21:37:51 +0000
committerMax Howell2009-11-07 18:22:35 +0000
commita4e86bb3264a17e0d5227e058d8bc4ea17f3dfbb (patch)
treef1de9b91f471ab2084237fd8bbbeb4fd37411a55 /Library/Homebrew/global.rb
parent6386ce4df509b49f39d4dcddfe8d9020314c9df7 (diff)
downloadbrew-a4e86bb3264a17e0d5227e058d8bc4ea17f3dfbb.tar.bz2
Move BuildError and ExceutionError to global.h
More sensible, and fixes brew
Diffstat (limited to 'Library/Homebrew/global.rb')
-rw-r--r--Library/Homebrew/global.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index fd2916b21..946ce6669 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -54,3 +54,13 @@ MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f
HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})"
+
+
+class ExecutionError <RuntimeError
+ def initialize cmd, args=[]
+ super "Failure while executing: #{cmd} #{args*' '}"
+ end
+end
+
+class BuildError <ExecutionError
+end