On 08/06/14 14:39, Dimitry Sibiryakov wrote:
> 06.08.2014 12:10, Alex Peshkoff wrote:
>> I've not said - not the status, I've said - in the status but separate
>> from errors. I.e. if you have now function get() returning mix of errors
>> and warnings, you will have getErrors() and getWarnings() instead.
>     I always thought that get() is a stub for backward compatibility made 
> because of lack
> of time for thinking. Actually, I still think so.

And you are absolutely right.

>     Ask yourself: what status is used for by app developers? As a one of 
> them, I know only
> two purposes:
> 1) Get error text to show to user or write to log (may be via throwing an 
> exception)
> 2) Check that a definite error code is inside and get its parameter(s)
>
>     None of these tasks are solved neither by get(), nor by getErrors().
>
>     I would suggest for IStatus following methods:
>
> int check() - returns 0 if status is empty, 1 if has warnings and 2 if has 
> errors
>
> char* getText() - return fully interpreted text
>
> ICode* getCode(ISC_STATUS code) - return object encapsulating a definite 
> gdscode block or
> NULL if such code isn't inside
>

Why not? Seems very reasonable.


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to