]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.119
authorfred <fred>
Wed, 27 Mar 2002 00:34:54 +0000 (00:34 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:34:54 +0000 (00:34 +0000)
lily/translator-group.cc

index 0dd0ea5d3a4d3966b1ef0026ace5453124a6f948..367e6d127790db4d285104e2eba88bccaff7cd08 100644 (file)
@@ -394,18 +394,14 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
 {
   bool ok = true;
   SCM type_p = SCM_EOL;
-  SCM errport = scm_current_error_port ();
 
   if (gh_symbol_p(sym))
     type_p = scm_object_property (sym, type_symbol);
 
   if (type_p != SCM_EOL && !gh_procedure_p (type_p))
       {
-       /* warning () ? */
-       scm_puts (_f ("Can't find property type-check for `%s'.  Perhaps you made a typing error?",
-                     ly_symbol2string (sym).ch_C ()).ch_C (),
-                 errport);
-       scm_puts ("\n", errport);
+       warning (_f ("Can't find property type-check for `%s'.  Perhaps you made a typing error?",
+                    ly_symbol2string (sym).ch_C ()));
       }
   else
     {
@@ -413,30 +409,17 @@ type_check_assignment (SCM val, SCM sym,  SCM type_symbol)
          && gh_procedure_p (type_p)
          && gh_call1 (type_p, val) == SCM_BOOL_F)
        {
-         ok = false;
-         scm_puts (_("Failed typecheck for `").ch_C (),errport);
-         scm_display (sym,errport);
-         scm_puts ( _("', value `").ch_C (), errport);
-         scm_write (val, errport);
-         scm_puts (_("' must be of type ").ch_C (), errport);
-         SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
-         scm_display (gh_call1 (typefunc, type_p), errport);
-         scm_puts ("\n", errport);     
-#if 0
+         SCM errport = scm_current_error_port ();
          ok = false;
          SCM typefunc = scm_eval2 (ly_symbol2scm ("type-name"), SCM_EOL);
          SCM type_name = gh_call1 (typefunc, type_p);
-         /* warning () ? */
 
          scm_puts (_f ("Failed typecheck for `%s', value `%s' must be of type `%s'",
                        ly_symbol2string (sym).ch_C (),
-                       ly_symbol2string (val).ch_C (),
-                       ly_scm2string (ly_write2scm (val)).ch_C (),
-                       ly_symbol2string (type_name).ch_C ()).ch_C (),
+                       ly_scm2string (ly_write2scm( val)).ch_C (),
+                       ly_scm2string (type_name).ch_C ()).ch_C (),
                    errport);
          scm_puts ("\n", errport);                   
-#endif
-
        }
     }
   return ok;