Browse files

useless begin

  • Loading branch information...
1 parent 7abeaeb commit 7be970b54c708be071767cddfc3b4498556c5b8c @indirect indirect committed Mar 2, 2013
Showing with 17 additions and 19 deletions.
  1. +17 −19 lib/bundler/friendly_errors.rb
View
36 lib/bundler/friendly_errors.rb
@@ -1,24 +1,22 @@
module Bundler
def self.with_friendly_errors
- begin
- yield
- rescue Bundler::BundlerError => e
- Bundler.ui.error e.message, :wrap => true
- Bundler.ui.trace e
- exit e.status_code
- rescue Interrupt => e
- Bundler.ui.error "\nQuitting..."
- Bundler.ui.trace e
- exit 1
- rescue SystemExit => e
- exit e.status
- rescue Exception => e
- Bundler.ui.error <<-ERR, :wrap => true
- Unfortunately, a fatal error has occurred. Please see the Bundler
- troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
+ yield
+ rescue Bundler::BundlerError => e
+ Bundler.ui.error e.message, :wrap => true
+ Bundler.ui.trace e
+ exit e.status_code
+ rescue Interrupt => e
+ Bundler.ui.error "\nQuitting..."
+ Bundler.ui.trace e
+ exit 1
+ rescue SystemExit => e
+ exit e.status
+ rescue Exception => e
+ Bundler.ui.error <<-ERR, :wrap => true
+ Unfortunately, a fatal error has occurred. Please see the Bundler
+ troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
- ERR
- raise e
- end
+ ERR
+ raise e
end
end

0 comments on commit 7be970b

Please sign in to comment.