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,
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.

.



Relevant Pages

  • Re: Error handling in VB6
    ... The VB syntax for catching and handling errors is definitely not ... exceptions thrown in Main, and in anything called from Main. ... OnError GoTo SomeErrHandler ... VB6 has no such thing as a global error handler. ...
    (microsoft.public.vb.general.discussion)
  • Re: File Descriptors
    ... At least one Tcl ... I think that depends somewhat one where you are coming to tcl/tk from. ... With regard to error handling in particular, ... Conditions under which exceptions occur ...
    (comp.lang.tcl)
  • Re: Practical error/exception handling...
    ... >> exceptions be iterated in order to get a better response. ... >> What I have done in the past is to have a database table of error codes ... >> error to a global error handling routine that can roll back transactions ... deal with a missing network connection or a file being locked when these ...
    (alt.comp.lang.borland-delphi)
  • Re: VB2008: Getting the System.Reflection.PropertyInfo from within a class property
    ... to get into Exception handling. ... MyClass is responsible for the data ... In case user input is required the the data is passed to a ... Stacktrace" in the case of handling exceptions. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Oh boy, how did we miss this...
    ... >This error seems to trigger SEH immediately, but no handler responded because I ... use the OS's own reporting mechanism in a way that was never intended (at ... There are several different error handling mechanisms in Windows... ... Structured Exceptions ...
    (comp.lang.pascal.delphi.misc)