Skip to content

Release 1.0.15

Compare
Choose a tag to compare
@LesterLyu LesterLyu released this 03 Aug 23:50
· 44 commits to master since this release

Related PR: #17

  • Correct error handling on both regular parser and on dependency parser.
  • DepParser now takes a third optional argument ignoreError: boolean, defaults to false.
    • ignoreError=false: the parser will throw a FormulaError when Error occurred.
    • ignoreError=true: the parser will return partial dependencies.
  • Capture lexing & parsing error to FormulaError (#ERROR!).
  • Provides detailed error in error.details if it is parsing/lexing error or other unexpected error.
    try {
         parser.parse('SUM(1))', position);
     } catch (e) {
         expect(e).to.be.instanceof(FormulaError);
         expect(e.details.errorLocation.line).to.eq(1);
         expect(e.details.errorLocation.column).to.eq(7);
         expect(e.name).to.eq('#ERROR!');
         expect(e.details.name).to.eq('NotAllInputParsedException');
     }
  • Provides error location error.details.errorLocation if it is parsing or lexing error.
      errorLocation: {line:1, column: 6}