    # File lib/chef/knife.rb, line 344
        def read_config_file(file)
          Chef::Config.from_file(file)
        rescue SyntaxError => e
          ui.error "You have invalid ruby syntax in your config file #{file}"
          ui.info(ui.color(e.message, :red))
          if file_line = e.message[/#{Regexp.escape(file)}:[\d]+/]
            line = file_line[/:([\d]+)$/, 1].to_i
            highlight_config_error(file, line)
          end
          exit 1
        rescue Exception => e
          ui.error "You have an error in your config file #{file}"
          ui.info "#{e.class.name}: #{e.message}"
          filtered_trace = e.backtrace.grep(/#{Regexp.escape(file)}/)
          filtered_trace.each {|line| ui.msg("  " + ui.color(line, :red))}
          if !filtered_trace.empty?
            line_nr = filtered_trace.first[/#{Regexp.escape(file)}:([\d]+)/, 1]
            highlight_config_error(file, line_nr.to_i)
          end

          exit 1
        end