Skip to content
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

improve twig error logging #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derMart
Copy link

@derMart derMart commented Dec 23, 2022

I noticed, that the nextcloud log does not include file number and line incase of a twig error. That makes development of themes very hard. This is an attempt to improve the situation.

@PhrozenByte
Copy link
Collaborator

Thank you for your contribution! 👍

I was thinking, what do you think about adding a separate TwigErrorResponse (similar to PicoErrorResponse) with a separate twig.php template (similar to Pico's error.php) that shows this information directly to the website owner (and just the website owner), instead of just showing a generic error?

@derMart
Copy link
Author

derMart commented Jan 5, 2023

That would be really awesome. Even better if that error page also shows the complete stack trace (not just first file name and line number as in this pr). Problem is, I don't have any time to do that ... at least not at the moment. Just one remark: if such error page is implemented I would find it valueable for an error still to appear inside nextcloud.log, so that it is persistent. So maybe gradually improve things, starting with this simple PR?

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

Successfully merging this pull request may close these issues.

2 participants