aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-12-29 22:51:55 -0500
committerJack Nagel2014-12-29 22:51:55 -0500
commit912a586d15daaa9daf4c4831dc5cc9022acc2b62 (patch)
tree7bd969c04cc073e2e1ffe496fdec129a5747b065 /Library
parenta9556651022a92ae8134b1efbfa67831d5eb2e5e (diff)
downloadbrew-912a586d15daaa9daf4c4831dc5cc9022acc2b62.tar.bz2
Preserve backtrace for download errors
Diffstat (limited to 'Library')
-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