Subject | Re: [Firebird-Architect] XSQLDA/XSQLVAR issues |
---|---|
Author | Nando Dessena |
Post date | 2005-01-14T19:06:04Z |
Jim,
J> The new API should define a single exception pseudo-object as a simple C
J> structure with a virtual function vector and extern "C" methods plus a
J> C++ exception class wrapper. A typical callback function might look
J> like this:
J> static void exceptionCallback (FBException *exception)
J> {
J> throw SQLException (exception);
J> }
J> where FBException was the POD (plain old data) exception pseudo-object
J> and SQLException the C++ wrapper. As long as the function above is
J> compiled with the same compiler as the rest of the application code,
J> which could be different from whatever Firebird was compiled with,
J> exceptions will work as excepted in the application code.
I'm not sure at all it's going to be very easy for languages other than C++
and Java, but I'll save further comments for when a formal
specification or a detailed proposal is available.
Ciao
--
Nando Dessena
http://www.flamerobin.org
J> The new API should define a single exception pseudo-object as a simple C
J> structure with a virtual function vector and extern "C" methods plus a
J> C++ exception class wrapper. A typical callback function might look
J> like this:
J> static void exceptionCallback (FBException *exception)
J> {
J> throw SQLException (exception);
J> }
J> where FBException was the POD (plain old data) exception pseudo-object
J> and SQLException the C++ wrapper. As long as the function above is
J> compiled with the same compiler as the rest of the application code,
J> which could be different from whatever Firebird was compiled with,
J> exceptions will work as excepted in the application code.
I'm not sure at all it's going to be very easy for languages other than C++
and Java, but I'll save further comments for when a formal
specification or a detailed proposal is available.
Ciao
--
Nando Dessena
http://www.flamerobin.org