[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can \barNumberCheck be set to error?
From: |
thorne |
Subject: |
Re: Can \barNumberCheck be set to error? |
Date: |
Thu, 3 Dec 2015 15:34:02 -0700 |
Thank you. I have changed the relevant bit to
(begin
(ly:input-message (*location*) "")
(ly:error "Barcheck failed got ~a expect ~a" cbn n)))))))
which works, but is not very elegant. This is the first time I've
looked at the Internals documentation. I didn't see anything like a
"ly:input-error" function that I would have expected. Is this the
idiomatic way to send a location in the input file along with an error
message?
On Wed, Dec 2, 2015 at 11:39 PM, David Kastrup <address@hidden> wrote:
> thorne <address@hidden> writes:
>
>> I am just wondering if there is any way to set only \barNumberCheck to
>> generate an error instead of a warning.
>>
>> I am using a Makefile to handle a project. I am using \barNumberCheck
>> on every bar on every part. It is convenient to have Lilypond error
>> any time a bar number check fails so that the render fails and I know
>> right away.
>>
>> I tried doing -dwarning-as-error, which works, but then makes the
>> render fail any time anything generates a warning, which is probably
>> not something I can have.
>>
>> Or, is there a better approach in general?
>
> \barNumberCheck is defined in ly/music-functions-init.ly. It's less
> than a dozen lines. Just copy that definition and replace the call to
> ly:input-warning with something else.
>
> --
> David Kastrup
--
รพ