Handling missing resources

Posted by Domchi on Stack Overflow See other posts from Stack Overflow or by Domchi
Published on 2010-04-28T18:32:22Z Indexed on 2010/04/28 18:37 UTC
Read the original article Hit count: 371

I've just found myself in situation where I needed to handle exception I'll probably never get, so out of curiosity, let's do a small poll.

  1. Do you validate the presence of resources in your programs? I mean, those resources which are installed with your program, like icons, images and similar. Generally, if those are missing, either your install didn't do its job, or the user randomly deleted files in your app.

  2. If you do validate the presence, what do you do when the files are not there?

Of course, for web apps, you'll have nice 404 page or broken link, but what about the rest? Fail early, yes, but leave handling failures to your compiler, or what?

© Stack Overflow or respective owner

Related posts about resources

Related posts about exception-handling