Closed ktwbc closed 8 years ago
Interesting problem... could you try catching \Exception $objExc
instead of Exception $objExc
(with a leading backslash)? It could be that you already have another exception class named Exception
in the current namespace or in one of the namespaces imported with use …
statements.
Argh, you called it exactly. Somehow PHPStorm was being helpful and autocreated
use Symfony\Component\Security\Acl\Exception\Exception;
picking the wrong Exception instead of \Exception and so the trap wasn't getting it. I didn't even see that use statement.
Would you have any idea why FirebaseException which is just an extension of Exception wouldn't be caught in a regular try/catch?
About 1 out of 10 times I get a timeout to Firebase on this code:
However when the timeout occurs, it always breaks and halts the program:
updating firebase
[Kreait\Firebase\Exception\FirebaseException]
HTTP Error: An error occurred when fetching the URI "https://mytestaccount.firebaseio.com/point2.json" with the adapter "guzzle_http" ("cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received").
[Ivory\HttpAdapter\HttpAdapterException]
An error occurred when fetching the URI "https://mytestaccount.firebaseio.com/point2.json" with the adapter "guzzle_http" ("cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received").
Trying to figure out what about this library would ignore the error trap.