lilypond-user
[Top][All Lists]
Advanced

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

Re: suppress warnings


From: Reinhold Kainhofer
Subject: Re: suppress warnings
Date: Tue, 29 May 2012 16:22:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 20/05/2012 21:19, David Kastrup wrote:
> Graham Percival <address@hidden> writes:
>
>> On Sun, May 20, 2012 at 05:01:40PM +0200, Peter O'Doherty wrote:
>>> Is it possible to suppress specific (expected) warnings?
>> No, unfortunately.
>  -- Function: ly:expect-warning str rest
>      A Scheme callable function to register a warning to be expected
>      and subsequently suppressed.  If the warning is not encountered, a
>      warning about the missing warning will be shown. The message
>      should be translated with `(_ ...)' and changing parameters given
>      after the format string.

Exactly, this function can be used to suppress one warning from being
printed (for usage examples, see some of our regtest files in
input/regression/ in the lilypond source).
Note, however, that this function does not turn off the given warning in
general, so if you get 15 warnings in your score, you'll have to call
this function 15 times.

The reason for this is that this function is meant for our regtest to
check whether an expected warning is really printed. It was never meant
to suppress one particular type of warnings altogether...

The real issue is: Why is that warning supposed to be there in the first
place? Shouldn't you be looking for a way to fix the underlying problem
instead?

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org




reply via email to

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