Files
liquidjs/error.js
T
2016-06-17 14:59:30 +08:00

22 lines
557 B
JavaScript

function TokenizationError(message, input, line, stack) {
this.name = "TokenizationError";
this.message = (message || "");
this.input = input;
this.line = line;
if(stack) this.stack = stack;
}
TokenizationError.prototype = Error.prototype;
function ParseError(message, input, line, stack) {
this.name = "ParseError";
this.message = (message || "");
this.input = input;
this.line = line;
if(stack) this.stack = stack;
}
ParseError.prototype = Error.prototype;
module.exports = {
TokenizationError, ParseError
};