tags:

views:

48

answers:

5

My program is in Flex but it doesn't really matter for the question I am asking. OK say I need to load an XML file for the application to work at all. If I capture an IOError while the xml file is loading, what logically should I do with that? The application needs it or the app is useless, so should I just keep re-trying on error, or should I notify the user to try again later? What would you do?

Thanks.

A: 

Like GMail - do both. Notify the user when an error happens or a timeout is hit, and keep trying in the meantime.

Loading is taking longer than expected, retrying - please wait...
MaxVT
+1  A: 

Ask the user what to do - Retry or Fail, with Fail meaning the app will close . If it makes sense, give the user a chance to browse to the resource.

John Dibling
A: 

Notify the user that the XML is not available, and offer the user the possibility to retry loading the XML, locate another XML or quit the application.

mouviciel
+1  A: 

It really depends on the nature of the file. If you know the file will exist at one time, it may make sense to wait for the file's creation (although this seems like a poor man's network model). However, in situations where an application is useless without a resource, I would fail unrecoverably and give meaningful error messages to the user, as well as log some debugging code to a file that the user could later submit for developer debugging.

Stefan Kendall
A: 

I don't think you should really try to many times that the page has noticeable lag. It really depends on whether the file being accessed is controlled by a third party or not and whether it is usually failing for large chunks of time or just say a second.

Rob Ryan