How can I get the RenderError error content in it after render('index.liquid')? #506
maiyuanrdt
started this conversation in
General
Replies: 1 comment
-
It should work. Could you provide a runnable demo for this problem?
LiquidJS Playground does a similar work, when you visit
https://liquidjs.com/playground.html#eyUgYXNzaWduCg==,e30= it calls render
and catches any render error.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I get the RenderError error content in it after render('index.liquid')?
When some tags or filters are parsed abnormally, they want to get the abnormal content and mix it into the final html result, so that the page can report the error message to the front-end template friendly.
Tried to use catch, it didn't work
render('index.liquid').catch(e => e.message)
try{
renderSync('index.liquid')
} catch(e) {
e.message
}
Beta Was this translation helpful? Give feedback.
All reactions