Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Improve error message for invalid filter queries #758

Merged
merged 3 commits into from
Apr 21, 2020
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/syntax-tree/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class SyntaxTree {

evaluate = (target: any) => {
if (!this.isValid) {
const msg = `unable to evaluate target: syntax tree is invalid for query=${this.query}`;
const msg = `DataTable filtering syntax is invalid for query: ${this.query}`;

Logger.error(msg);
throw new Error(msg);
Expand Down Expand Up @@ -90,4 +90,4 @@ export default class SyntaxTree {

return toStructure(this.syntaxerResult.tree);
}
}
}