Exceptions in Ruby 

def Factory.make_app(*args)
  begin
    opt = parse_options(args)
    cfg_file = extract_config_file(opt[:args])
    return mapper.get_class('app').new(cfg_file, opt)
  rescue SystemExit
    exit
  rescue ShowVersionException
    puts "#{@@APP_NAME} Version #{@@VERSION}"
    exit
  rescue Exception => detail
    mapper.get_class('app').fatal_error(detail)
    exit
  end
end