Hi,

It seems that in UniObjects dotNet if you do a ..
    UniDynArray uda = objFile.Read();

and the record does not exist it throws a UniFileException, error number 30001
(UVE_RNF)
There is no error number property so you have to filter this out of the
UniFileException.message.
Once you have this number you it seems you cant compare it with the
UniObjectsTokens.UVE_RNF token as its hidden.
This also happens when you try to objFile.LockRecord(1) on a record that
doesnt exist

I guess this comes about because there is no THEN or ELSE on these methods and
you throw an exception instead.
Hence you create a wrapper around these methods and pass in an extra parameter
to indicate if you want to know if the record doesnt exist.

What concerns me is that all this would be dependent on getting the error
number from the message.
eg string pattern = @"(\[ErrorCode=\d+\])";
If the format of the message changes then your test no longer works
In UniObjects you used to be able to test for this in the File.Error property

Apparantly this has been raised with IBM but its priority is low.
Does anyone have a smart way of handling this and does raising all these
exceptions slow things down say when you are doing a batch update.

jak
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to