-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TwigException for invalid syntax crashes process, no way to catch error???? #705
Comments
err is null and no way to catch the error.. Here is an example: wdes/changelog-generator-twig@e5c6ee2 cc @RobLoach |
i openned this file : node_modules/twig/twig.js Replacing it does throw a valid error now instead of crashing the process but since the project is dead, how do we get this corrected in the package without hacking the node_modules folder ? :) sample test file
|
Does it work if you set |
it changes behavior in the sens it emits an uncaughtException with this version (syntax is crazy :))
This other version results in a local catch (way better IMHO)
with express it also results in uncaughtexception whatever i try. which is very bad.
|
Thanks for the additional details, this appears to be an issue with the Express specific render functions. |
This is still a problem for me, I can not catch the error. That said with See my commit where I added an unit test and |
trying to render preview of email template, but i noticed anytime there was a twig syntax error process crashes.
so i created a template with invalid syntax and set out to try and capture the invalid syntax exception and handle the error appropriately, but it seems this is not possible for some reason?
my code is:
It seems no matter what i do, i am unable to capture the error and the process exits with error code. Please advise
The text was updated successfully, but these errors were encountered: