Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nyarly
Created February 10, 2012 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyarly/1792699 to your computer and use it in GitHub Desktop.
Save nyarly/1792699 to your computer and use it in GitHub Desktop.
Change Rake exception handling behavior
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