fix nested render error message

This commit is contained in:
harttle
2016-11-16 00:48:54 +08:00
parent 20af0c489e
commit 64e9cb7044
2 changed files with 37 additions and 3 deletions
+4
View File
@@ -31,6 +31,10 @@ ParseError.prototype = Object.create(Error.prototype);
ParseError.prototype.constructor = ParseError;
function RenderError(e, tpl) {
// return the original render error
if(e instanceof RenderError){
return e;
}
this.name = this.constructor.name;
this.stack = e.stack;