]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/score-engraver.cc: Uniformise error message.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 18 Aug 2002 10:02:17 +0000 (10:02 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 18 Aug 2002 10:02:17 +0000 (10:02 +0000)
* 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.

ChangeLog
lily/grob-property.cc
lily/lily-guile.cc
lily/score-engraver.cc

index 3b1f4758eb341b593ab207a79ee3aecb3aec525b..0024cf96d8e496d3126222ce4d83809c45c275a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2002-08-18  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * 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.
 
index 2ea216668a0802fd21f8f75edc81b3a9f2f6d143..19230c0d6bb978f1bffa0f7969748416459c2bcf 100644 (file)
@@ -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); 
 }
index e911cb013e7981a19ec06f38626d6bdf96a37358..278478140091c88f62bf2612478b99a267541955 100644 (file)
@@ -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
     {
index bcea6959638007d684861109ee97faa7fcfa7fb2..693158620ba71fbc41889ffb947651fdf95b8a3c 100644 (file)
@@ -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);