Exception handling

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bevo

    #1

    Exception handling

    In my enterprise application I'd like my DataAccess layer to be responsible
    for handling all database error situations and to basically throw custom
    exceptions according to whether db connection is ok or not, that is,
    cDBDownExceptio n if ok or cDBException if not ok. These two exceptions would
    provide all information about the original cause etc.

    1. Is this a wise exception handling policy?

    2. We use both Oracle and SQL Server. Which exceptions do I catch to
    ascertain that we've lost contact with the db?

    Kind regards.

Working...