Handling 'XML returned by Facebook is empty!'

Aug 1, 2007 at 11:26 AM
Hi all,

I'm a new Facebook developer and hence I don't have any friends listed on the site, during development I get the error 'XML returned by Facebook is empty!' when calling _fbService.GetFriends(). I understand what is happening here, but would it not be better / expected behaviour to just return an empty list rather than raise an exception?

My understanding is that exceptions are expensive in processor time and that zero friends is not an error state (quite normal for us geeks really). Also, when using the return from this I can just check the count of the returned collection for a zero and display the text 'Try washing' if I need to catch it. If I don't want to check the number of friends then it will work just as advertised and I won't need to put an additional 'try' around it.

There are probably other exceptions that are raised on zero data where I would just expect an empty collection, hence my question 'Is this by design'?

Possibly too late to change the behaviour now anyway, but I'd be interested in your opinions.


Aug 7, 2007 at 4:33 AM
I agree. I originally coded it that way, but it got changed to this mistakenly. I have no problem making this change. I will add an issue and make the change when I have some time to code on this later this week.
Aug 7, 2007 at 9:23 AM
Excellent, I look forward to it.


Sep 12, 2007 at 4:26 AM
Sorry I have been gone for awhile. I promise to look into the current logged issues and try to get a new version out by end of this week.