       e = reason.body
       @CompileErrorsView ?= require './views/compile-errors-view'
       errorParser ?= require 'gcc-output-parser'
-      if e.errors && e.errors.length
+      if e?.errors && e.errors.length
         errors = errorParser.parseString(e.errors[0]).filter (message) ->
           message.type.indexOf('error') > -1
 

          @SettingsHelper.setLocal 'compile-status', {errors: errors}
          atom.commands.dispatch @workspaceElement, "#{@packageName()}:show-compile-errors"
      else
        @SettingsHelper.setLocal 'compile-status', {error: e.output}

      atom.commands.dispatch @workspaceElement, "#{@packageName()}:update-compile-status"


    process.chdir rootPath
    filesObject = {}
    console.info 'Compiling following files:', files
    for file in files
      filesObject[path.relative(rootPath, file)] = fs.readFileSync(file)

