On 14/06/2012 06:13, Alex Peshkoff wrote:
> For me this looks like regression, sorry.
>
If you talking about specific subject about warning removal, I'd instead
call it "let bad legacy and non-feature interfere with new design for no
reason".

> 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.

I've probably already meet the code you're talking about, and my changes
does not interfere with it.

In these places, things looks like now, example:

IAttachment* att = service->attachDatabaseNoThrow(status, ...);

if (status->isSuccess())
    ...

...

The callers are not obliged to use the throwing methods.

> 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?
>
>
The code just automatically creates inline non-virtual methods, example:

// New method automatically generated
IAttachment* attachDatabase(const char* filename)
{
    // call attachDatabaseNoThrow, check status vector and throw if
necessary
}

// Original method
virtual IAttachment* attachDatabaseNoThrow(IStatus* status, const char*
filename)
{
    ...
}

These inline non-virtual methods does not interfere with linkage nor
vtable layouts, so from external POV, nothing changes.

Externally, someone may even declare attachDatabaseNoThrow as the
original attachDatabase if exceptions are not intended to be thrown.


Adriano


------------------------------------------------------------------------------
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