I have a Laravel 5 backend that can store files using different protocols based upon user configuration. Currently I am supporting FTP and SFTP and am trying to gracefully trap the errors in order to alert the user to the fact that there may be an issue with their (S)FTP server.
Since this is a common routine that also writes to local storage, I am trying to make sure that I trap all errors that are related to (S)FTP while still trapping "regular" errors.
In my testing, I have disabled my FTP server and then my SFTP server and in doing so noticed that they generate entirely different exceptions when I try to connect. For example,
FTP - Runtime Exception
SFTP - Logic Exception
My understanding is that Laravel uses Flysystem but I cannot seem to find any documentation on all the possible errors that could occur when using (S)FTP and am wondering if someone can point me in the right direction on where to find it.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire