aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
authorJack Nagel2014-12-29 22:51:55 -0500
committerJack Nagel2014-12-29 22:51:55 -0500
commitab64e120d011d110b701bd9fcc1f459444bc3aae (patch)
treee70874427e3e69ba8385220ece2705418878ef9e /Library/Homebrew/exceptions.rb
parent820fb42d9b4b787e5ba1729ed7ac8bb189d955de (diff)
downloadhomebrew-ab64e120d011d110b701bd9fcc1f459444bc3aae.tar.bz2
Preserve backtrace for download errors
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 949eee233..a6a3380bb 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -198,11 +198,12 @@ end
# Raised in Resource.fetch
class DownloadError < RuntimeError
- def initialize(resource, e)
+ def initialize(resource, cause)
super <<-EOS.undent
Failed to download resource #{resource.download_name.inspect}
- #{e.message}
+ #{cause.message}
EOS
+ set_backtrace(cause.backtrace)
end
end