XOOPS / XoopsCore

Core Framework for next version of XOOPS CMS: 2.6.0
https://xoops.org
138 stars 81 forks source link

added full debug message for Admin #583

Closed mambax7 closed 5 years ago

mambax7 commented 5 years ago

The $e->getMessage() is not enough for development.

So instead of this:

image

we can have this:

image

mambax7 commented 5 years ago

It would be also nice to have a Debugbar there. Currently it is not included in the: private function reportFatalError($msg)

geekwright commented 5 years ago

This is the last ditch failure message, so code which makes assumptions about the availability of the system are mot allowed. As an example, it is possible for Logger::handleException() to be invoked before there is even a database connection. It needs to stay clean. There probably should be a little more information in the message, but no calls that could potentially result in additional errors -- which would result in no message at all.

I do understand the need, and propose a better solution: https://github.com/geekwright/xwhoops

It adds whoops as the handler for any fatal error after user authorization has completed if it is appropriate. Not to be used as an excuse to not handle your own errors, but it is a fine safety net.

mambax7 commented 5 years ago

Cool! I just installed it, and let you know my experience with it. Thanks for providing it!

mambax7 commented 5 years ago

It works very well! It caught very nicely couple of errors...

alain01 commented 5 years ago

Could you add a screenshots here?

mambax7 commented 5 years ago

Alain, it's the same as in the demo here: http://filp.github.io/whoops/demo/