I think there's usually a good way to determine exceptions based on access to resources, integrity of data and the validity of data.
Access Exceptions
- Creating or connecting to any kind of connection (remote, local).
- Occurs in: Databases, Remoting
- Reasons: Non-existent, Already in Use or Unavailable, Insufficient/Invalid Credentials
- Opening, Reading or Writing to any kind of resource
- Occurs in: File I/O, Database
- Reasons: Locked, Unavailable, Insufficient/Invalid credentials
Integrity of Data
- There could be many cases where the integrity of the data matters
- What it references, what it contains...
- Look for resources on the methods or code that requires a set of criteria for the data to be clean and in a valid format.
- Example: Trying to parse a string with the value 'bleh' to a number.
Validity of Data
- Is this the correct data provided? (It's in the right format, but it might not be the correct set of parameters for a given situation)
- Occurs in: Database Queries, Transactions, Web Services
- Example: Submitting a row to a database and violating a constraint
Obviously there are other cases, but these are usually the ones I try to abide by where its needed.