Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

PDO error triggers Elao Twig template error #68

Open
ArlingtonHouse opened this issue Jun 13, 2017 · 2 comments
Open

PDO error triggers Elao Twig template error #68

ArlingtonHouse opened this issue Jun 13, 2017 · 2 comments

Comments

@ArlingtonHouse
Copy link

Hi thanks for a great bundle! I've got a bug in our code that's causing problems for Elao ErrorNotifier. I'm not sure what the underlying PDO issue is, any thoughts on this? Thanks!

[2017-06-13 12:59:35] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("SQLSTATE[HY000]: General error")." at /vendor/elao/error-notifier-bundle/Resources/views/mail.html.twig line 456 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template ("SQLSTATE[HY000]: General error"). at /vendor/elao/error-notifier-bundle/Resources/views/mail.html.twig:456, PDOException(code: HY000): SQLSTATE[HY000]: General error at /vendor/elao/error-notifier-bundle/Twig/DumpyTwigFilter.php:222)"}

@ArlingtonHouse
Copy link
Author

Some additional info-- discovered that the underlying bug wasn't related to PDO. So this seems like a Twig/PDO problem with the Elao Error Notifier.

@binarious
Copy link
Contributor

mail.html.twig at line 456 prints out the scope variables. Maybe this hits a Doctrine object which triggers some lazy-loading of a property. This could result in a database error. I think it would be useful to try and catch database errors in the DumpyTwigFilter. What do you think, @benji07?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants