You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've registered a helper that throws an exception if a partial is not found, but that error is not propagated up to NodeJS render() method that is trying to render the file that has the template:
stack": [
"Error: no partial found",
" at Object.hbs.registerHelper (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/rwd-modules/hbs-helpers.js:560:11)",
" at Object.eval (eval at createFunctionContext (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js:239:23), <anonymous>:11:110)",
" at main (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/node_modules/handlebars/lib/handlebars/runtime.js:152:32)",
" at ret (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/node_modules/handlebars/lib/handlebars/runtime.js:155:12)",
" at ret (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/node_modules/handlebars/lib/handlebars/compiler/compiler.js:513:21)",
" at render_file (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/node_modules/hbs/lib/hbs.js:49:23)",
" at ReadFileContext.callback (/Users/jeff.l/Documents/workspace/responsive-web-design/RWD/node_modules/hbs/lib/hbs.js:168:16)",
" at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:242:13)"
],
"level": "error",
"message": "uncaughtException: no partial found"
That last message come from my handlebars helper function, which throws an Error. It would be useful to catch this error higher up the chain so that I can try alternate rendering in the node server.
The text was updated successfully, but these errors were encountered:
Thanks for the report! Could you put together a reproduction that shows the error for example? So i can run and debug it.
Partial rendering is an async task, as as long as whatever that NodeJS rendering API is async and not sync it should be possible to do (but you'd need to provide a callback and cannot use try catch).
But having a demonstration would help understand the issue better.
I've registered a helper that throws an exception if a partial is not found, but that error is not propagated up to NodeJS render() method that is trying to render the file that has the template:
That last message come from my handlebars helper function, which throws an Error. It would be useful to catch this error higher up the chain so that I can try alternate rendering in the node server.
The text was updated successfully, but these errors were encountered: