I'd love to see an error code on the site error page, so that users could report the error code and developers could easily look it up.

The enclosed patch implements this feature, please consider it for 1.1 - that'd be wonderful!

Comments

shaisachs’s picture

b-prod’s picture

I am not really sure on what you could be able to investigate, because there are very few information provided with fatal errors. The server logs would give you more information than watchdog in such cases.

Moreover, the UUID code is passed to watchdog, which in most case is stored in database using dblog module. Those data are removed after some times, so you could not rely on the UUID reference, which will be missing at a given point.

The purpose of the module is to provide a clean error page when a PHP fatal error occurs. Displaying an error code with a number does not seem very clean to me.

A possible way to handle customer support could be to create a custom page with a message and a form below, that would tell the user to report the problem (an help text asking for the reproduction steps should be enough).

You can do that easily with the use of Panels and Entity Form (and Rules if you want some actions to be triggered, like sending emails). Then you can specify the newly created form in the admin UI to override the default error page.

But I do not know your process and may be missing something...