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: 391
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.
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.
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