[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix #655, \remove should emit warning for unknown engravers
From: |
Neil Puttock |
Subject: |
Re: [PATCH] Fix #655, \remove should emit warning for unknown engravers (in \with) |
Date: |
Fri, 15 Aug 2008 18:43:49 +0100 |
2008/8/15 Han-Wen Nienhuys <address@hidden>:
> On Fri, Aug 15, 2008 at 1:48 PM, Neil Puttock
>> - Should an unknown engraver cause compilation to fail? I was
>> wondering whether it might be better to issue a warning rather than an
>> error in get_translator ().
>
> No, in general, we should try to never let compilations fail; that
> is: there should be an error message, but the program may not abort.
OK.
>> - There's a redundant error message in Context_def::add_context_mod
>> (); it never gets called, since compilation stops in get_translator
>> ():
>>
>> if (!get_translator (sym))
>> error (_f ("program has no such type: `%s'", ly_symbol2string
>> (sym).c_str ()));
>
> that's just fine - an extra safety net does not hurt.
I was going to suggest using warning () in get_translator, then
Context_def::add_context_mod () could be amended as follows:
if (get_translator (sym))
translator_mods_ = scm_cons (scm_list_2 (tag, sym), translator_mods_);
Surely there's no situation where the error message could be called,
unless get_translator uses warning ()?
Regards,
Neil