diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 90f81e109..a8a7d99c1 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -237,6 +237,8 @@ def has_cause?(ex) # :nodoc: def display_exception_message_details(ex) # :nodoc: if ex.instance_of?(RuntimeError) trace ex.message + elsif ex.respond_to?(:detailed_message) + trace "#{ex.class.name}: #{ex.detailed_message(highlight: false)}" else trace "#{ex.class.name}: #{ex.message}" end