Skip to main content
Topic: Advanced template error reporting  (Read 1582 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Advanced template error reporting

Something I've been working on recently is advanced template error reporting for ElkArte 2.0-dev. Some addon authors may recognize this from SMF when a template has a parse error.

FireShot Capture 013 - Template Parse Error! - http___localhost_elk-dev_index.php.png
(press F to pay respects)

Now, because PHP 7 uses Throwables (similar to exceptions), I can even show this page if there's a runtime error other than a parse error. Should I also display this error page or undefined indexes, too? That would solve the annoying issue of errors hidden in HTML attributes.
LiveGallery - Simple gallery addon for ElkArte

Re: Advanced template error reporting

Reply #1

Interesting stuff. nods

This error usually is a blocking one (i.e. the execution stops), do you plan to make undefined indexes blocking as well?
That may be a little too much in most of the conditions (e.g. a bug in some peculiar configuration of settings), but in case of debugging it would be useful indeed.

Actually, I wonder if it may even be possible to populate a little popup to show live in the page (not a full overlay, just something for example in the corner or a page) "this page generates this error", of course shown only to admins.
What would you think?
Bugs creator.
Features destroyer.
Template killer.