Skip to content
asperous edited this page Oct 21, 2012 · 1 revision

Better Error Handling in CFEngine Proposal

  1. Collect Data
    • Error Line & Column
    • Error Token
    • What kind of Error? Symbol, Constraint, or Attribute
  2. Collect More Data
    • Use a special lexer that tokenizes newlines and common bad punctuation
    • Collect available tokens in each block type/body or bundle type
  3. Figure out what the root problem could be
    • Use a special parser to look for problematic token pattern sequences
    • Look for problems in forgetting to use approperate delimiters (with those newlines and indentation)
    • Look for known bugs
  4. Advice Accurately, what the problem is and how it could be fixed, or where more information could be found.
    • Show file, line, etc.
    • Highlight problem
    • Use edit distance to show possible matches (with excerpt of what it does)
Clone this wiki locally