On 8/4/10 11:22 AM, ThinkGareth wrote:
Having a tough time catching exceptions in SF2...

I'm using KrisWallSmiths's Facebook Bundle ( 
http://github.com/kriswallsmith/KrisFacebookBundle
) for SF2 and can't seem to capture Exceptions..


$facebook = $this->container->getFacebookService();
try {
     $me = $facebook->api('/me');
} catch (FacebookApiException $e) {
     //echo $e->getResult();
}

I know nothing about this bundle, but if FacebookApiException is a class in the default namespace, and if your code is in a namespaced file, you need to use \FacebookApiException, instead of FacebookApiException.

Fabien

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to