@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
20 lines (19 loc) • 629 B
JavaScript
import { formatError } from "./format-error.js";
/** Syntax error thrown during parsing. Contains source location and formatted caret display. */
export class ExpressionError extends Error {
rawMessage;
start;
end;
source;
suggestion;
constructor(message, location, suggestion) {
const formatted = formatError(message, location, suggestion);
super(formatted);
this.name = "ExpressionError";
this.rawMessage = message;
this.start = location.start;
this.end = location.end;
this.source = location.source;
this.suggestion = suggestion;
}
}