Closed craftpip closed 8 years ago
@craftpip what errors are you getting?
hello
I'm sorry, the error is not at $filesystem->has('nonExistentDir');
But I'm not able to catch the errors, when i try to login with incorrect information. or when it reaches timeout.
@craftpip what do you mean with login?
When using the FTP,FTPS,SFTP adapters. (or others) i try to login to servers with incorrect credentials.
code:
try {
// the $ftpadapter and $flysystem is initiated here.
// later i do try to listContents of the ftp server. (The login information i provided were invalid)
$a = $filesystem->listContents(); // this gives the error.
} catch ( \Exception $e){
// But the error is not caught here.
echo $e->getMessage();
}
Also, I'm using FuelPHP framework.
For example:
Fuel\Core\PhpErrorException [ Warning ]: ftp_systype(): Sorry, cleartext sessions are not accepted on this server.
cannot be handled.
@craftpip I'm not sure what we could do from flysystem's side to improve this. It seems like you've got misconfiguration, so you need to fix the credentials rather than catch the error at runtime.
I'm despirate to get Flysystem working with FuelPHP, i need to handle FTP exceptions because I'm building a FTP connection test GUI, which needs to show errors.
However the exceptions are caught in set_error_handler
but doesn't really help.
Anyways thanks for your support Frank. :)
@craftpip I don't think Flysystem is the tool to do that. It is meant to be used when you have valid credentials.
@frankdejonge Thanks again man. :)
Hello, i generated some obvious errors, for example:
$filesystem->has('nonExistentDir');
It seemsTry catch
isn't working for this. The error bypasses try catch.Thank you.