[fdo-internals] RE: FDO RFC 37 - Detailed Exception is ready for review.

Dan Stoica dan.stoica at autodesk.com
Wed Jun 17 16:26:48 EDT 2009


Ø  Do SQLServer and Oracle have the same error codes?

No, they don't. This is my point, e.g. OCIDR_RDBI_END_OF_FETCH can be mapped to RDBI_END_OF_FETCH and such type of error is common to SQLServer, MySql etc. I suppose it's not a crime to also have RDBI_ORA_xxx for specific cases (oddities).

Currently we get a localized "End of fetch" message but not the error code. And the native error message is lost along the way, although FdoException allows for a 'cause' detail...

Dan.

From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Traian Stanev
Sent: Wednesday, June 17, 2009 4:06 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] RE: FDO RFC 37 - Detailed Exception is ready for review.


My assumption was that the integer error codes would be potentially different for each provider, since the RFC mentions native error codes for SQLServer and Oracle. Do SQLServer and Oracle have the same error codes?

Traian


From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Dan Stoica
Sent: Wednesday, June 17, 2009 3:59 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] RE: FDO RFC 37 - Detailed Exception is ready for review.

Talking about the native error codes apparently the RFC doesn't say how they look like...

In my mind the native error codes are not necessary a direct mapping to ORA-02429, for example. A rdbms driver has limited ability to extract the exact cause anyways. (Even the native error messages are sometimes very cryptic or ambiguous or both) Therefore the numerical 'native' error code is in fact 'low level' error code and provider agnostic like RDBI_DATA_TRUNCATED.

Dan.

From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Traian Stanev
Sent: Wednesday, June 17, 2009 12:04 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] RE: FDO RFC 37 - Detailed Exception is ready for review.


My main concern is that having native error codes encourages the client code to be non-generic, in that it would have to know which provider it is working with, in order to handle the native error code correctly. Of course, that is a concern about the client code, not FDO itself, so the client code is free to handle this any way it wants... including in bad ways.

Traian


From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Dan Stoica
Sent: Tuesday, June 16, 2009 10:10 AM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: FDO RFC 37 - Detailed Exception is ready for review.

catch (FdoException* e)
{
    FdoInt64 errorCode = e->GetNativeErrorCode();
    e->Release();
    // Take some measures according to native error code
    ......
}
I think no matter how many exception subclasses are invented, the only useful thing for handling the error is the error code.

And I said before, another very useful thing to have is the ability to distinguish between errors and warnings.

Dan.

From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Leaf Li
Sent: Monday, June 15, 2009 9:37 PM
To: fdo-internals at lists.osgeo.org
Subject: [fdo-internals] FDO RFC 37 - Detailed Exception is ready for review.

All,

FDO RFC 37 - Detailed Exception is ready for review. Can you review it?
http://trac.osgeo.org/fdo/wiki/FDORfc37

Thanks,
Leaf Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20090617/42c26be0/attachment-0001.html


More information about the fdo-internals mailing list