samedi 30 janvier 2016

Laravel displaying / logging errors

So I've just spent quite some time on something that should have been very quick to fix.

I'm on a local environment, with debug set to true. I was working on a php file which implements the Jsonable interface, and I got the compatibility a bit wrong. Unfortunatly, when I ran this file, it simply showed a 500 error and a completely blank, white page, without any errors.

I checked my error log, and that didn't have any errors in it (relating to this issue) either.

I found online that setting debug to true in Laravel hides sets display_errors to 0. I quickly did a ini_set('display_errors', 1) in my called controller and I got the fatal error message I was looking for!

My question is:

How can I display these fatal errors etc (not exceptions) in Laravel when debug is true, without specifying ini_set('display_errors', 1) in all my controllers?! Why does Laravel hide errors when in debug mode anyway?! It's very frustrating having an error which isn't displayed (even when in debug mode), and isn't logged!

Any help is appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire