Hello Maxime,

On Mon, May 09, 2016 at 11:17:25AM +0200, Maxime de Roucy wrote:
> > I have another comment here, please try to factor the error messages
> > using a goto, this block appears at least 3 times :
> 
> I tried to use goto but there is always a slight difference in the
> Alert(...) calls, so there is quite as many label as Alert call.

I had the impression that the error messages were the same, maybe I
have not seen well.

> After some lines it seams error-prone and not very readable.

I understand.

> Instead I create Alert_exit which embedded the exit call inside Alert.
> I just sent the patchs.
> 
> Is this solution good for you ?

To be honnest, no, I really don't like it. There are very few such locations
that benefit from it and 2/3 of them even had the code ordering changed to
be able to use the function (unrolling done before the message instead of
after), which basically means that if any error or warning is printed in
any of these functions (or if any crashes) the error output will be confusing
or missing.

Thanks,
Willy


Reply via email to