harishanchu / Laravel-FTP

A simple Laravel 4/5/6/7 ftp service provider with basic ftp methods.
220 stars 87 forks source link

Add exceptions for more detailed error handling #74

Open kbasten opened 5 years ago

harishanchu commented 5 years ago

Thank you @kbasten, I will look into it this weekend.

harishanchu commented 5 years ago

Hi @kbasten,

It makes sense to throw named exceptions from connection setup methods as it was throwing Exceptions even before.

Regular ftp methods are coded in way that it will always catch the exception and return false if action fails. This is convenient that we don't have to worry about wrapping regular ftp methods with try catch where ever they are called. Convince me why should we throw exceptions in regular ftp methods or please revert the changes done to changeDir method so that I can accept and merge this pull request.