diff --git a/lib/rake/application.rb b/lib/rake/application.rb index a20c196b1..2079fb9be 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -85,12 +85,14 @@ def load_rakefile # Run the top level tasks of a Rake application. def top_level - if options.show_tasks - display_tasks_and_comments - elsif options.show_prereqs - display_prerequisites - else - top_level_tasks.each { |task_name| invoke_task(task_name) } + standard_exception_handling do + if options.show_tasks + display_tasks_and_comments + elsif options.show_prereqs + display_prerequisites + else + top_level_tasks.each { |task_name| invoke_task(task_name) } + end end end