How come OracleException for all Exceptions?
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
How come OracleException for all Exceptions?
Hi -just a quick query/suggestion.
How come nearly all Exceptions that come back from Oracle are OracleExceptions, and not mapped to their own type? Obviously you can tell what sort of exception it is using the Code, but wouldnt it be better if you mapped each code to a specific Exception?
That way you could catch specific exceptions.
Just a thought
Thanks
Kevin
How come nearly all Exceptions that come back from Oracle are OracleExceptions, and not mapped to their own type? Obviously you can tell what sort of exception it is using the Code, but wouldnt it be better if you mapped each code to a specific Exception?
That way you could catch specific exceptions.
Just a thought
Thanks
Kevin
-
- Posts: 64
- Joined: Wed 04 Jan 2006 15:32
Yes I understand how it works, but what I am suggesting is the corelab drivers catch the exception thrown by the server and then throw an exception relevant to the error. Checking the error code is soooo VB6
Using a case statement on the error code also means that my catch block loses some of its structure.
Using a case statement on the error code also means that my catch block loses some of its structure.