Permalink
Browse files

include template file paths in the call stacks of template syntax errors

  • Loading branch information...
1 parent ba9f3a8 commit fa7f832c5d2b228cb4cad236968e047c124597b4 @jankuca committed Jun 12, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/ViewStack.js
View
@@ -33,6 +33,10 @@ ViewStack.prototype.execute = function (context, callback, ctx) {
var view = views[--i];
view.render(context, function (err, partial_rendering) {
if (err) {
+ var call_stack = (err.stack || '').split("\n");
+ call_stack.splice(1, 0, ' at ' + view.template_path_);
+ err.stack = call_stack.join("\n");
+
callback.call(ctx, err, null);
} else {
iter(partial_rendering);

0 comments on commit fa7f832

Please sign in to comment.