I have a method that checks if a user has valid session information. It is assumed that you have thrown the Guzzle\Http\Exception\BadResponseException , but when I try to catch it:
catch (Guzzle\Http\Exception\BadResponseException $e) { return false; } return true
Laravel does not get to this code and immediately starts its own error handling. And ideas on how to get around Laravels own implementation and use my own Catch.
EDIT: I just found out that Laravel uses the same Exception handler as Symfony, so I also added the Symfony2 tag.
EDIT 2:
I kind of fixed the problem by disabling Guzzle exceptions and checking the return header manually. This is a slightly short cut, but in this case he does the job. Thanks for answers!
php exception symfony laravel guzzle
Martijn
source share