lilypond-user
[Top][All Lists]
Advanced

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

Lilypond error behaviour


From: Andrew Bernard
Subject: Lilypond error behaviour
Date: Fri, 15 Apr 2016 21:59:47 +1000
User-agent: Microsoft-MacOutlook/f.15.1.160411

I am writing a lilypond server to process lilypond source files submitted by a client program to avoid the startup costs of lilypond. This is based on an idea by Sharon, I think pulled up from past archives, and is a small project Sharon and Urs and I are working on experimentally.

In relation to this, an oddity – to me, at least – came up, when dealing with errors in source files. If I have a lilypond source as shown in the example here, it’s deliberately incorrect, and I would expect lilypond to report a fatal error and stop. Instead, this file produces not only a fatal error message from lilypond, but also generates a PDF file. Why is the file generated? This has me rather confused – I thought my server code was not working. The syntax error is reported as fatal not as a warning.

Is this expected behaviour? Wouldn’t a complete syntax error stop processing? What am I missing here? Should I be addressing instead the bug list?

Andrew

— snip

file test.ly:
——

\version "2.19.39"

junk syntax error on purpose

{
  c''
}

lilypond output:
——

Processing `test.ly'
Parsing...
test.ly:3:6: error: syntax error, unexpected STRING, expecting '.' or '=' or ','
junk 
     syntax error on purpose
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `/tmp/lilypond-kUaRg5'...
Converting to `test.pdf'...
Deleting `/tmp/lilypond-kUaRg5'...
fatal error: failed files: "test.ly"

— snip


reply via email to

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