def execute!
      begin
        options   = Options.new(argv)

        generator = ErbGenerator.new(Data.new(options.data_sources))
        generator.compile(options.source, options.destination)

        exitstatus = 0
      rescue Interrupt
        Filegen::Ui.warning 'You told me to stop command execution.'
        exitstatus = 2
      rescue Exceptions::ErbTemplateHasSyntaxErrors => e
        Filegen::Ui.error "Syntax error in ERB-Template: \n" + e.message
        exitstatus = 3
      rescue Exceptions::YamlFileNotFound => e
        Filegen::Ui.error "Yaml-file \"#{JSON.parse(e.message)['file']}\" not found."
        exitstatus = 4
      rescue StandardError => e
        Filegen::Ui.error "#{e.class} - #{e.message}"
        exitstatus = 99
      end

      @kernel.exit(exitstatus)
    end
def execute!
      begin
        options   = Options.new(argv)

        generator = ErbGenerator.new(Data.new(options.data_sources))
        generator.compile(options.source, options.destination)

        exitstatus = 0
      rescue Interrupt
        Filegen::Ui.warning 'You told me to stop command execution.'
        exitstatus = 2
      rescue Exceptions::ErbTemplateHasSyntaxErrors => e
        Filegen::Ui.error "Syntax error in ERB-Template: \n" + e.message
        exitstatus = 3
      rescue Exceptions::YamlFileNotFound => e
        Filegen::Ui.error "Yaml-file \"#{JSON.parse(e.message)['file']}\" not found."
        exitstatus = 4
      rescue StandardError => e
        Filegen::Ui.error "#{e.class} - #{e.message}"
        exitstatus = 99
      end

      @kernel.exit(exitstatus)
    end
Create runner
 @param [Array] argv
  Commandline arguments
 @param [IO] stdin
  Stdin
 @param [IO] stdout
  Stdout
 @param [IO] stderr
  Stderr
 @param [Kernel] kernel
  Kernel class
 Execute runner