G
Guest
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,
cDBDownException 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.
for handling all database error situations and to basically throw custom
exceptions according to whether db connection is ok or not, that is,
cDBDownException 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.