qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/5] s390x/ipl: Load network boot image


From: Christian Borntraeger
Subject: Re: [Qemu-devel] [PATCH 3/5] s390x/ipl: Load network boot image
Date: Fri, 24 Feb 2017 12:15:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 02/24/2017 11:11 AM, Thomas Huth wrote:

>>> ... and then you do another error_report here again ... so one error
>>> gets reported with two error message. Wouldn't it be nicer to rather do
>>> error_setg(...) in load_netboot_image() and then report only one error
>>> at this level here?
>>>
>>
>> What would be the advantage of doing that?
> 
> It's just good coding style to report an error only once, at the
> outermost calling function. Otherwise the same error gets reported
> multiple times to the user, with different error messages, and that can
> easily get confusing. It's likely not a big problem here yet, since the
> call depths is only 2 functions, but imagine a situation where you've
> got a call depth or 5 or more and an error is reported at every
> depths... that's ugly. So this is why we've got error_setg() and friends
> in QEMU.
> 
>  Thomas

Farhan was already convinced. Can you check v2 of this patch set?
Thanks for doing the review :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]