Best exception handling practices or recommendations?
Posted
by
user828584
on Programmers
See other posts from Programmers
or by user828584
Published on 2012-06-26T23:23:23Z
Indexed on
2012/06/27
3:23 UTC
Read the original article
Hit count: 371
I think the two main problems with my programs are my code structure/organization and my error handling. I'm reading Code Complete 2, but I need something to read for working with potential problems.
For example, on a website, if something can only happen if the user tampers with data via javascript, do you write for that? Also, when do you not catch errors? When you write a class that expects a string and an int as input, and they aren't a string and int, do you check for that, or do you let it bubble up to the calling method that passed incorrect parameters?
I know this is a broad topic that can't be answered in a single answer here, so what I'm looking for is a book or resource that's commonly accepted as teaching proper exception handling practice.
© Programmers or respective owner