I am using FB Connect and the PHP class called Facebook, that is provided by FB. Whenever something goes wrong FB throws Fatal Error and application dies. That's great for testing but now very nice for production code. I've looked through code and can't find a way to disable that but may be I overlooked something. So, is there any way to disable fatal errors other than looking through their class and removing every line like this
throw new FacebookApiE开发者_开发百科xception($result);
You should catch exceptions, not remove them.
try {
//do something with the facebook api
}
catch (FacebookApiException $e) {
//an error occured, handle it
}
And btw: fatal errors are different from exceptions.
精彩评论