From: Jan Nieuwenhuizen Date: Sun, 18 Aug 2002 10:02:17 +0000 (+0000) Subject: * lily/score-engraver.cc: Uniformise error message. X-Git-Tag: release/1.6.0~45 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b9c4f77d495179fb4da989ea374f63858ecd9950;p=lilypond.git * lily/score-engraver.cc: Uniformise error message. * lily/grob-property.cc (internal_set_grob_property, internal_get_grob_property): [!NDEBUG] Remove, use abort instead of assert; we always want this functionality. Uniformise warning message. --- diff --git a/ChangeLog b/ChangeLog index 3b1f4758eb..0024cf96d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2002-08-18 Jan Nieuwenhuizen + * lily/score-engraver.cc: Uniformise error message. + + * lily/grob-property.cc (internal_set_grob_property, + internal_get_grob_property): [!NDEBUG] Remove, use abort instead + of assert; we always want this functionality. Uniformise warning + message. + * lily/main.cc (main, main_prog): Bugfix: move exit-upon-files back, until after evaluating init_scheme_code. diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 2ea216668a..19230c0d6b 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -71,19 +71,16 @@ extern void check_interfaces_for_property (Grob const *me, SCM sym); void Grob::internal_set_grob_property (SCM s, SCM v) { - /* - Perhaps we simply do the assq_set, but what the heck. - */ - if (!live()) - return ; + /* Perhaps we simply do the assq_set, but what the heck. */ + if (!live ()) + return; -#ifndef NDEBUG if (internal_type_checking_global_b) { - assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?"))); - check_interfaces_for_property(this, s); + if (type_check_assignment (s, v, ly_symbol2scm ("backend-type?"))) + abort (); + check_interfaces_for_property (this, s); } -#endif mutable_property_alist_ = scm_assq_set_x (mutable_property_alist_, s, v); } @@ -98,13 +95,13 @@ Grob::internal_get_grob_property (SCM sym) const s = scm_sloppy_assq (sym, immutable_property_alist_); -#ifndef NDEBUG if (internal_type_checking_global_b && gh_pair_p (s)) { - assert (type_check_assignment (sym, gh_cdr (s), ly_symbol2scm ("backend-type?"))); - check_interfaces_for_property(this, sym); + if (!type_check_assignment (sym, gh_cdr (s), + ly_symbol2scm ("backend-type?"))) + abort (); + check_interfaces_for_property (this, sym); } -#endif return (s == SCM_BOOL_F) ? SCM_EOL : ly_cdr (s); } diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index e911cb013e..2784781400 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -579,17 +579,16 @@ type_check_assignment (SCM sym, SCM val, SCM type_symbol) if (type != SCM_EOL && !gh_procedure_p (type)) { - warning (_f ("Can't find property type-check for `%s' (%s). Perhaps you made a typing error? Doing assignment anyway.", + warning (_f ("Can't find property type-check for `%s' (%s).", ly_symbol2string (sym).to_str0 (), - ly_symbol2string (type_symbol).to_str0 () + ly_symbol2string (type_symbol).to_str0 ()) + + " " + _ ("Perhaps you made a typing error?")); - )); - - /* - Be strict when being anal :) - */ + /* Be strict when being anal :) */ if (internal_type_checking_global_b) - abort(); + abort (); + + warning (_ ("Doing assignment anyway.")); } else { diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index bcea695963..693158620b 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -97,10 +97,10 @@ Score_engraver::finish () void Score_engraver::initialize () { - Font_metric *fm = - all_fonts_global->find_afm("feta20"); + Font_metric *fm = all_fonts_global->find_afm("feta20"); if (!fm) - error (_("Could not find feta20.afm. Fonts have not been installed properly; Aborting")); + error (_f ("can't find `%s'", "feta20.afm") + + "\n" +_ ("Fonts have not been installed properly. Aborting")); unsmob_translator_def (definition_)->apply_property_operations (this);