There seems to be a small flaw in exception handling for file downloads.
For example, if I run
new FacebookFile('https://path.to/file-that-doesnt-exist.png');
The Exception that gets thrown is a standard Exception rather than a FacebookSDKException. The output will be similar to:
fopen(https://path.to/file-that-doesnt-exist.png): failed to open stream: Connection timed out
This means that I can't do proper error handling unless I run my own check to see if the file exists first, which is an option but if you can do proper handling, then that would be good too!
There seems to be a small flaw in exception handling for file downloads.
For example, if I run
The Exception that gets thrown is a standard
Exception
rather than aFacebookSDKException
. The output will be similar to:This means that I can't do proper error handling unless I run my own check to see if the file exists first, which is an option but if you can do proper handling, then that would be good too!