[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questionable aspects of QEMU Error's design
From: |
Markus Armbruster |
Subject: |
Re: Questionable aspects of QEMU Error's design |
Date: |
Wed, 01 Apr 2020 17:49:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Alex Bennée <address@hidden> writes:
> Vladimir Sementsov-Ogievskiy <address@hidden> writes:
>
>> Side question:
>>
>> Can we somehow implement a possibility to reliably identify file and line
>> number
>> where error is set by error message?
>>
>> It's where debug of error-bugs always starts: try to imagine which parts of
>> the error
>> message are "%s", and how to grep for it in the code, keeping in mind also,
>> that error massage may be split into several lines..
>>
>> Put file:line into each error? Seems too noisy for users.. A lot of errors
>> are not
>> bugs: use do something wrong and see the error, and understands what he is
>> doing
>> wrong.. It's not usual practice to print file:line into each message
>> for user.
>
> I tend to use __func__ for these things as the result is usually easily
> grep-able.
Putting __func__ in error messages makes them both greppable and ugly.