On 12/9/20 2:31 PM, Dimitry Sibiryakov wrote:
09.12.2020 12:23, Alex Peshkoff via Firebird-devel wrote:
That depends upon getState() internals, is not it? :)

  Yes. Firebird implementation recognizes zero error code in getState() so I wonder if it is a specs' requirement or such recognition can be performed in other places.


For backward compatibility reason - people may add a call to getErrors() in one place but check result in some other passing STATUS* as parameter - IStatus implementation never returns true empty errors vector in 'no errors' state. Instead at least 3 elements are always present "1, 0, 0". I'm unsure shiuld it be treated as requirement or implementation detail, sooner second case. Checking getState() is better (and in a typical case of 'no errors' - much faster with appropriate wrapper) way to check for presence of errors.






Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to