Skip to content

Commit

Permalink
forward input + reviver to errorIndicator
Browse files Browse the repository at this point in the history
when your stream encounters parsing errors, you may want access to the raw value.
  • Loading branch information
ak--47 committed Aug 18, 2023
1 parent 2c0ec73 commit bd84d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonl/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class JsonlParser extends Utf8Stream {
try {
return JSON.parse(input, reviver);
} catch (error) {
if (typeof errorIndicator == 'function') return errorIndicator(error);
if (typeof errorIndicator == 'function') return errorIndicator(error, input, reviver);
}
return errorIndicator;
}
Expand Down

0 comments on commit bd84d42

Please sign in to comment.