I hate writing error condition code. I guess I don't have a good approach to doing it:
- Do you write all of your 'functional' code first then go back in and add error handling or vice versa?
- How stupid do you assume your users are?
- How granular do you make your exception throws?
Does anyone have sage advice to pass on to make this easier?
A lot of great answers guys, thank you. I had actually gotten more answers about dealing with the user than I thought. I'm actually more interested in error handling on the back end, dealing with database connection failures and potential effects on the front end, etc. Keep them coming!