lilypond-devel
[Top][All Lists]
Advanced

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

Re: Fix crash when unknown grob name is passed to ly:engraver-make-grob


From: dak
Subject: Re: Fix crash when unknown grob name is passed to ly:engraver-make-grob (issue 5715053)
Date: Sat, 03 Mar 2012 05:43:50 +0000

On 2012/03/03 04:38:36, Pavel Roskin wrote:
I'm not getting any interesting information:

...
   [/usr/local/share/lilypond/2.15.32/ly/context-mods-init.ly]
   [/usr/local/share/lilypond/2.15.32/ly/engraver-init.ly]]
  [bad.ly]
Interpreting music...
[/usr/local/share/lilypond/2.15.32/fonts/otf/emmentaler-20.otf]
fatal error: failed files: "bad.ly"

Sure, I can move the programming_error() call before scm_throw() and
print
whatever I want.  I just want to follow the coding style of Lilypond.
And the
existing style is such that scm_throw() is only used twice, both for
more
serious errors in the input.

You can call ly:error.  It does not exactly raise an exception but
exit(1).  Or you call programming_error and return a dummy value of the
expected type, something that makes it possible to continue.

But continuing with a wrong-type value is only going to cause trouble
later on.

http://codereview.appspot.com/5715053/



reply via email to

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