On 06/11/12 20:01, Adriano dos Santos Fernandes wrote:
> Hi!
>
> Warnings were always a second-class citizen in Firebird. Usage of them
> in the design of new features were already rejected because "nobody
> checks them".
>
> As I told some time ago, I was testing a scheme to implement/use our
> public interfaces in a more C++ way.
>
> That is most related to exceptions. It must catch exceptions and encode
> in IStatus and check IStatus and raise exceptions. All of that
> automatically and without violate cross-method boundaries.
>
> Note: I'm not talking about change the interfaces, it must continue
> using they status parameter for cross-language/-compiler
> interoperability.I talk only about the C++ layer.
>
> There is one problem. We can't make it really C++ friendly without
> removing the need to pass a status everywhere, but there is no way to
> return warnings without them. We can maintain the status parameter, but
> then, it makes things still ugly.
>
> Would you consider about removing warnings from Firebird? By remove I
> mean that inner layers will not carry them anymore for user. That even
> means that someone using v3 API and old engine will not see them anymore.
>

For me this looks like regression, sorry.

I suppose we should find better way to do this. I've used to meet more
or less same (as far as I can suppose) problem when reworking code in
interface.cpp to make it use exceptions instead a lot of copies of
status vector. But it was required to return server's errors from one
place (where it's received from network). Throwing such errors after
receiving from server was almost impossible, cause this is not an error
condition for remote client, and it's normal control flow should not be
interrupted - that is why that errors are almost like warnings for
remote client. As the result we still have a status vector parameter in
a number of remote client functions, but all errors/warnings raised in
remote client itself are thrown to the client in C++ style.

It's hard to suggest something not seeing the code. Can you send me some
fragments helping to better understand what do you want to do?

A.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to