Hi,

Przemysław Czerpak wrote:
I have a proposal to move ads error value to osCode and leave
subCode zero, if we do not return a dbf compatible error. This
change also allows to get more precise error description by using
AdsGetErrorString(), since we will know ads error in all cases.
Any objections?

For me it's very good idea.

But one problem we have... There is code:

/* 1001 and 7008 are standard ADS Open Errors that will usually be sharing issues */
HB_ERRCODE errOsCode = u32RetVal == 1001 || u32RetVal == 7008 ? 32 : 0;
fRetry = commonError( pArea, EG_OPEN, ( HB_ERRCODE ) u32RetVal, errOsCode, ( const char * ) pOpenInfo->abName, EF_CANRETRY | EF_CANDEFAULT, &pError ) == E_RETRY;

This interacts with default error handler behavior in errorsys.

Sharing violation is not indicated by some error subCode and general EDBF_OPEN_DBF is returned in dbf rdd. So, osCode is the only way to detect sharing violation and it is hardcoded to DOS error codes.

Perhaps we must leave this hack, or... extend default error handler to adapt to rddads. It is also not a nice solution, because ADS is not even in core code.

Any proposal on this issue?


Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to