Christian Lippka <[EMAIL PROTECTED]> writes:

> +1 For Franks suggestion, I very often use UNO_QUERY_THROW to enforce
> non null, since using if() does not only introduce a second line of
> code, also your error handling and recovery code is shorter if it is
> reduced to one catch block.
> 
Christian,

this was about

Reference<foo::XBar> x(y->baz());
assureNotNull(x);

vs.

Reference<foo::XBar> x(y->baz(),
                       UNO_QUERY_SPECIAL_MAGIC);

I was saying that this heavy overloading hurts readability, and that
this separate checking function/macro/whatever does something that's
orthogonal to the ifc query above. And that's what I still think.

If UNO_QUERY_THROW already gives what's needed here, fine. 

Cheers,

-- 

Thorsten

If you're not failing some of the time, you're not trying hard enough.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to