even when something causes an error, the application exits with zero.
|
def catch_exceptions(&block) |
|
begin |
|
block.call |
|
rescue CmdException, OptionParser::ParseError => e |
|
puts "ERROR: #{e}" |
|
puts |
|
print_usage |
|
rescue RuntimeException => e |
|
puts "ERROR: #{e}" |
|
end |
|
end |
even when something causes an error, the application exits with zero.
daemons/lib/daemons/cmdline.rb
Lines 119 to 129 in bf0ca25