I'm testing my app to make sure in production it handles errors properly, and one such test is if the mysql or redis services it uses are down.
I'm looking for it to show the 500 error page, but currently its showing a blank page.
I haven't tested this under Laravel 4 yet but the app I'm working on is using Laravel 3 and for production the errors config is set to not show detail and to log instead.
I'd rather it go to the 500 page so at least uses know there's an error in this rare case it may be down.
Does anyone know if this is possible? or is this is what happens in Laravel 4?
[Edit 1]
On investigation, it looks like the MySQL connection doesn't occur until my first db call, which makes and so my first db call is in the start.php
file. Now i can wrap this call in a try/catch BUT at this point i can't return Response::error('500');
as its not in a route or controller, and Event::fire(500)
doesn't work at this stage either as it needs to read other files after such as the routes file which also has db calls.
So what im now looking for is a way to call the 500 error page directly from the start.php
file and just stop the app running at this point, before the routes.php
file or any other files are even loaded in.
Any ideas?