Created
February 10, 2012 20:41
-
-
Save nyarly/1792699 to your computer and use it in GitHub Desktop.
Change Rake exception handling behavior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Put this at the top of your Rakefile | |
class Rake::Application | |
def display_error_message(ex) | |
$stderr.puts "#{name} aborted!" | |
$stderr.puts "#{ex.class}: #{ex.message}" | |
$stderr.puts rakefile_location(ex.backtrace) | |
$stderr.puts "Tasks: #{ex.chain}" if has_chain?(ex) | |
$stderr.puts ex.backtrace.join("\n") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment