class Rake::Application

def display_error_message(ex)

Display the error message that caused the exception.
def display_error_message(ex)
  trace "#{name} aborted!"
  trace ex.message
  if options.backtrace
    trace ex.backtrace.join("\n")
  else
    trace Backtrace.collapse(ex.backtrace)
  end
  trace "Tasks: #{ex.chain}" if has_chain?(ex)
  trace "(See full trace by running task with --trace)" unless options.backtrace
end