influxdb-php
influxdb-php copied to clipboard
Manage connect exception
I simulated an InfluxDB server crash to see how my app work.
I got an exception directly from Guzzle library:
Guzzle is used by your library but not by the user. The end use should rely to your exception only IMHO.
If think it would be better to have you own generic exception for that.
What do you think?
:+1: , having a custom exception that would be thrown no matter what the exception is behind would allow to change implementations more easily. The underlying exception could still be passed as the $previous
argument of the constructor.
+1
Other drivers should probably be expected to throw exceptions as well, not just Guzzle-based one. It would probably be a BC break for them though, since it will cause them to start crashing instead of silently ignoring errors?