# File lib/kwalify/main.rb, line 121
    def self.main(command, argv=ARGV)
      begin
        main = Kwalify::Main.new(command)
        s = main.execute(argv)
        print s if s
      rescue Kwalify::CommandOptionError => ex
        raise ex if main.debug?
        $stderr.puts ex.message
        exit 1
      rescue Kwalify::KwalifyError => ex
        raise ex if main.debug?
        $stderr.puts "ERROR: #{ex.to_s}"
        exit 1
      #rescue => ex
      #  if main.debug?
      #    raise ex
      #  else
      #    $stderr.puts ex.message
      #    exit 1
      #  end
      end
    end