class Daemons::Controller
def catch_exceptions(&block)
def catch_exceptions(&block) begin block.call rescue CmdException, OptionParser::ParseError => e puts "ERROR: #{e.to_s}" puts print_usage() rescue RuntimeException => e puts "ERROR: #{e.to_s}" end end