Skip to content
Myr

expose err.view when failing to locate a view

Before adoption: this commit came in with the history the project adopted, so no landing records it.

allows for: err.view.path etc

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent b5d8d58 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:lib/view.js+3 added-1 removed
302 unmodified lines
303304 // Does not exist305 if (!view.exists) {306 if (app.enabled('hints')) hintAtViewPaths(orig, options);307 throw new Error('failed to locate view "' + orig.view + '"');307 var err = new Error('failed to locate view "' + orig.view + '"');308 err.view = orig;309 throw err;310 }311312 // Dynamic helper support313 if (false !== options.dynamicHelpers) {
69 unmodified lines