Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI and C++ Exceptions

Re: OCI and C++ Exceptions

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Sat, 01 May 1999 23:46:07 -0700
Message-ID: <372BF4AF.1BF172FE@u.washington.edu>


Actually, I have seen some sort of exception when initially connecting to the Oracle database
when using OCI via OTL under NT 4.0/MFC C++ 5.0. It is interesting because the problem occurs with the first connection to the database under the debugger. If the try-catch block excludes the first connection, everything is OK. In addition, with the MFC C++, when the exception is generated and you suggest ignoring it and continuing, everything is OK.

I have never bothered to track down the problem other than it is in the OCI code somewhere.

Mike Krolewski mikkro_at_hbsi.com

Merrill Lynch wrote:

> I'm using the OCI libraries on Solaris to call into an Oracle 7.3.3 server
> running on OpenVMS.
> Everything works fine until any of my code throws a C++ exception. The
> code refuses to handle the exception when the executable is linked to the
> OCI libraries.
>
> I've reduced the code to replicate the problem to the following:
>
> #include <iostream.h>
>
> int main(int, char**)
> {
> try
> {
> cout << "Throwing..." << endl;
> throw 1;
> }
> catch(...)
> {
> cout << "...caught!" << endl;
> }
> return 0;
> }
>
> When I build this without linking to the OCI libraries I works fine, i.e.
>
> Throwing...
> ...caught!
>
> But when I link to the OCI libraries it aborts with an unhandled exception.
>
> Has anyone got any ideas?
>
> Simon.
Received on Sun May 02 1999 - 01:46:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US