Welcome! and rules
Joel on Software
Coding For Errors
Error handling usually requires structural and/or logic changes anyway - so I just do it upfront.
Right at the beginning. As a very minimum, I'd add a top-level exception handler right away to make sure any error will be logged (or assertion raised). For more extensive advice, see "Code Complete" by Steven McConnell, the chapter on defensive programming.
Fog Creek Home