Method: Rake::Application#standard_exception_handling
- Defined in:
- lib/rake/application.rb
#standard_exception_handling ⇒ Object
Provide standard exception handling for the given block.
164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/rake/application.rb', line 164 def standard_exception_handling yield rescue SystemExit # Exit silently with current status raise rescue OptionParser::InvalidOption => ex $stderr.puts ex. exit(false) rescue Exception => ex # Exit with error message (ex) exit_because_of_exception(ex) end |