lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond error behaviour


From: Thomas Morley
Subject: Re: Lilypond error behaviour
Date: Mon, 18 Apr 2016 01:26:04 +0200

2016-04-17 21:01 GMT+02:00 Noeck <address@hidden>:

> IMHO, it would make sense to [...] have 3 categories:
> - warning: user, please look at this
> - error: this is severe, there is something definitely wrong, but
>   Lilypond did its very best to keep running
> - fatal error: this is severe and Lilypond could not rescue the
>   situation, nothing was produced

We do this already, (but see below for multi-file-compilation).

Actually, we have even more fine-grained errors/warnings/messages.
But if any problem causes an _error_  of any kind (not a warning),
even a non_fatal_error, LilyPond throws a fatal error _after_ having
tried to create a pdf.

In short:
If error detected?
1. print to terminal the kind of the error, with location
2. create pdf, if non_fatal_error
3. throw a fatal error

As far as I know, the third point was introduced, because the first
was ignored far too often.



> nothing was produced

Doesn't work for multi-file-compilation.
To illustrate:
Imagine three files
file-I.ly
file-II.ly
file-III.ly

file-II.ly contains nothing else than
#(ly:error "~a" (*location*))
The other files will not cause any error/warning

Now do
lilypond file-I.ly file-II.ly file-III.ly
You'll notice:
LilyPond will compile file-I.ly with pdf
file-II.ly causes a fatal error, Lilypond exits immediately
file-III.ly will not be compiled at all.

I'm aware Andrew intended to disregard multi-file-compilation, though
we need to care about the entire functionality.


So, how to do it reasonable different?


Cheers,
  Harm



reply via email to

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