Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good unittesting can trigger the relevant exceptions. I know this can be a lot of work to write tests which trigger all your corner cases. I practiced this in a recent project but now I'm much more confident in my code.

Another strategy is to catch the "expected" exceptions first followed by a general exception handler. This can use the `traceback` module to log the call chain and error message.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: