lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond error behaviour


From: Anthonys Lists
Subject: Re: Lilypond error behaviour
Date: Mon, 18 Apr 2016 23:01:55 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 18/04/2016 22:01, Sharon Rosner wrote:
Lilypond would expectedly complain about line 2, then proceed to put together the PDF file and finally exit with a “fatal error”. The PDF File would include 2 scores, so that means right after encountering the syntax error on line 2, it continued to correctly process line 3. So what was it that was fatal about this? Is this a matter of some internal implementation details we don’t understand or what? And again, how is this any different than a non-fatal error?

Firstly, as a programmer and a musician, I'd say that for lilypond to produce whatever output it can is IMPORTANT. A failed pdf is a perfectly usable debugging trace - I've used a computer system that, if the program failed, it erased any and all changes to open files - which is a recipe for frustration when debugging - wtf is the computer deleting my debug logs for!, and actually a data integrity nightmare too ... the more debugging info I have the better!

And secondly, to me it seems clear why the error is termed "fatal" - the parser aborted. You don't want a compilation error to return a fatal error to "make" and, because it receives a fatal error, make throws a fatal error and crashes too, do you? The question is WHERE in the stack do we actually trap and handle the error.

Lilypond, imho, makes the correct decision FOR THE USER, traps the error, and then turns the incomplete output, from the *crashed* parser, into an incomplete pdf. (Or, in this example, restarts the parser for the next score.) A *programmer* (which most lilypond users are *not*), wants to handle the problem at the next level up, in "make", but let's face it, how many of lilypond's users even know what make *is*?

And how many *programmers* actually bother to check compilation logs and fix problems that are thrown up? If you want strict error handling then add a --werror option to lilypond that just says "crash on error and let make handle it", then those people using make can deal with the lack of debug info their way.

But leave it the way it is for those users who never check the logs and just look to see if the output looks right. I must admit I fall into both camps - when running lily on Windows I only check the log if I have a problem. When running it on linux, I run it from konsole so I see all the errors and warnings anyway. And being the sort of person I am I tend to try to get rid of warnings because I know the result is a more robust system.

Cheers,
Wol



reply via email to

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