class ChefCLI::Policyfile::DSL

def error_context(policyfile_string, policyfile_filename, exception)

def error_context(policyfile_string, policyfile_filename, exception)
  if ( line_number_to_show = culprit_line_number(policyfile_filename, exception) )
    code = policyfile_string.lines.to_a[line_number_to_show - 1].strip
    "#{line_number_to_show}: #{code}"
  else
    "Could not find relevant code from backtrace"
  end
end