Hi Mindaugas,
> So we have two choices:
> 1) osCode=AdsError and hack for sharing violation (osCode=32,
> subCode=AdsError);
> 2) subCode=AdsError and not Clipper compatible subcodes for not ADS errors
> like EDBF_DATAWIDTH, etc. One of ways to solve ambiguity in this case is
> error code ranges. ADS uses error codes > 1000. Not ADS errors can be used
> from interval 1...999. We can even use "semi-compatible" DBF error in some
> cases, using EDBF_* - 1000, because all EDBF_* are below 2000.
>
> What solution do you prefer?
2).
BTW I don't see missing EDBF_DATAWIDTH subcode
a problem here, as the genCode is already saying
EG_DATAWIDTH. And as it's name ("general [error] code")
suggest, this is the code which can be used safely
across RDDs to detect data width errors, so all we
need to do is map specific ADS error codes to
matching genCodes and osCodes to keep compatibility
with other RDDs and existing app code.
App code which relies on specific subCodes is
not safe anyway. We simply cannot be compatible
here, since there is no general rule or predefined
values for subCodes.
[ Anyway as a last resort we may also try to
map ADS codes to Clipper subCodes if there is
an equivalent one, but IMO this is not very good
on the long run and can be confusing. I'd
prefer to have pure ADS error codes in subCode,
it's much cleaner this way and may not know
in advance what ADS codes will ever pop up
in the future anyway. ]
Brgds,
Viktor
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour