mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
refactor: use promise.mapSeries
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
function TokenizationError(message, input, line) {
|
||||
if(Error.captureStackTrace){
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
this.name = this.constructor.name;
|
||||
|
||||
this.message = message;
|
||||
this.input = input;
|
||||
this.line = line;
|
||||
}
|
||||
TokenizationError.prototype = Object.create(Error.prototype);
|
||||
TokenizationError.prototype.constructor = TokenizationError;
|
||||
|
||||
function ParseError(message, input, line, e) {
|
||||
if(Error.captureStackTrace){
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
this.name = this.constructor.name;
|
||||
this.originalError = e;
|
||||
|
||||
this.message = message;
|
||||
this.input = input;
|
||||
this.line = line;
|
||||
}
|
||||
ParseError.prototype = Object.create(Error.prototype);
|
||||
ParseError.prototype.constructor = ParseError;
|
||||
|
||||
function RenderBreak(message){
|
||||
if(Error.captureStackTrace){
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
}
|
||||
this.name = this.constructor.name;
|
||||
this.message = message;
|
||||
}
|
||||
RenderBreak.prototype = Object.create(Error.prototype);
|
||||
RenderBreak.prototype.constructor = RenderBreak;
|
||||
|
||||
module.exports = {
|
||||
TokenizationError, ParseError, RenderBreak
|
||||
};
|
||||
Reference in New Issue
Block a user