bug-lilypond
[Top][All Lists]
Advanced

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

Re: request: better error message


From: David Kastrup
Subject: Re: request: better error message
Date: Fri, 10 Nov 2017 10:59:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> 2017-11-08 23:56 GMT+01:00 David Kastrup <address@hidden>:
>> Thomas Morley <address@hidden> writes:
>>
>>> 2017-11-08 23:40 GMT+01:00 David Kastrup <address@hidden>:
>>>> Thomas Morley <address@hidden> writes:
>>>>>
>>>>> {
>>>>>   \override Fingering #'stencil =
>>>>>     #(lambda (grob)
>>>>>       (ly:grob-set-property! grob 'stencil
>>>>>         (grob-interpret-markup grob #{ \markup \normal-text "foo" #})))
>>>>>   a''-1
>>>>> }
>>>>>
>>>>> I doubt many people would have been able to read the error and
>>>>> directly point to the faulty coding.
>>>>
>>>> Assertion failures should not be triggered by users anyway.  They point
>>>> to a violation of the program's assumptions severe enough that it makes
>>>> no sense to continue.  So this should likely become a programming error
>>>> instead.
>>>>
>>>> You still won't get sensible behavior here since the return value will
>>>> (I think) be wrong, too.
>>>
>>> I'm not that interested in a useful return value, but an (programming)
>>> error-message pointing to the location would be great.
>>> If not possible to point to the location, maybe something like "Can't
>>> set property 'stencil while setting 'stencil".
>>> Well, the wording is not accurate, but you may get the point!?
>>
>> "Property 'stencil changed from inside callback." or something.
>
>
>
> Yeah, that would have been really helpful.

Tracker issue: 5238 (https://sourceforge.net/p/testlilyissues/issues/5238/)
Rietveld issue: 334970043 (https://codereview.appspot.com/334970043)
Issue description:
  Callbacks setting properties are programming errors  Previously a
  callback setting a property led to an assertion failure. That's not
  particularly helpful since this is a somewhat easy user error to
  make.


-- 
David Kastrup



reply via email to

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