mirror of
https://github.com/harttle/liquidjs.git
synced 2026-10-03 00:55:13 -07:00
1.6.2
This commit is contained in:
Vendored
+7
-5
@@ -1322,16 +1322,17 @@ TokenizationError.prototype = Object.create(Error.prototype);
|
|||||||
TokenizationError.prototype.constructor = TokenizationError;
|
TokenizationError.prototype.constructor = TokenizationError;
|
||||||
|
|
||||||
function ParseError(e, token) {
|
function ParseError(e, token) {
|
||||||
|
_.assign(this, e);
|
||||||
|
this.originalError = e;
|
||||||
this.name = this.constructor.name;
|
this.name = this.constructor.name;
|
||||||
this.stack = e.stack;
|
|
||||||
|
|
||||||
this.input = token.input;
|
this.input = token.input;
|
||||||
this.line = token.line;
|
this.line = token.line;
|
||||||
this.file = token.file;
|
this.file = token.file;
|
||||||
|
|
||||||
var context = mkContext(token.input, token.line);
|
var context = mkContext(token.input, token.line);
|
||||||
this.message = mkMessage(e.message, token);
|
this.message = mkMessage(e.message || 'Unkown Error', token);
|
||||||
this.stack = context + '\n' + (this.stack || '');
|
this.stack = context + '\n' + (e.stack || '');
|
||||||
}
|
}
|
||||||
ParseError.prototype = Object.create(Error.prototype);
|
ParseError.prototype = Object.create(Error.prototype);
|
||||||
ParseError.prototype.constructor = ParseError;
|
ParseError.prototype.constructor = ParseError;
|
||||||
@@ -1341,15 +1342,16 @@ function RenderError(e, tpl) {
|
|||||||
if (e instanceof RenderError) {
|
if (e instanceof RenderError) {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
_.assign(this, e);
|
||||||
|
this.originalError = e;
|
||||||
this.name = this.constructor.name;
|
this.name = this.constructor.name;
|
||||||
this.stack = e.stack;
|
|
||||||
|
|
||||||
this.input = tpl.token.input;
|
this.input = tpl.token.input;
|
||||||
this.line = tpl.token.line;
|
this.line = tpl.token.line;
|
||||||
this.file = tpl.token.file;
|
this.file = tpl.token.file;
|
||||||
|
|
||||||
var context = mkContext(tpl.token.input, tpl.token.line);
|
var context = mkContext(tpl.token.input, tpl.token.line);
|
||||||
this.message = mkMessage(e.message, tpl.token);
|
this.message = mkMessage(e.message || 'Unkown Error', tpl.token);
|
||||||
this.stack = context + '\n' + (e.stack || '');
|
this.stack = context + '\n' + (e.stack || '');
|
||||||
}
|
}
|
||||||
RenderError.prototype = Object.create(Error.prototype);
|
RenderError.prototype = Object.create(Error.prototype);
|
||||||
|
|||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "shopify-liquid",
|
"name": "shopify-liquid",
|
||||||
"version": "1.6.1",
|
"version": "1.6.2",
|
||||||
"description": "A feature-rich Liquid template engine for Node.js and browsers, with compliance with the Ruby version.",
|
"description": "A feature-rich Liquid template engine for Node.js and browsers, with compliance with the Ruby version.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user