]> git.donarmstrong.com Git - lilypond.git/commitdiff
Clean up error messages in case of unattached tuplet bracket.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 17 Mar 2008 15:04:15 +0000 (12:04 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 17 Mar 2008 15:04:15 +0000 (12:04 -0300)
lily/spanner.cc
lily/tuplet-engraver.cc

index e73399dae07db19a06887cb09b25006be09b8716..0ae372ded3d4d485541efaeb14c4a351eaa25b1c 100644 (file)
@@ -191,7 +191,7 @@ Spanner::set_bound (Direction d, Grob *s)
   Item *i = dynamic_cast<Item *> (s);
   if (!i)
     {
-      programming_error ("must have Item for spanner bound");
+      programming_error ("must have Item for spanner bound of " + name());
       return;
     }
 
index 478469a1e2e5e5dc62bcfd60a6cc5da88fe5904e..5cd637e3f9eb2853376fe79130bc0c6f71ed3dd4 100644 (file)
@@ -133,12 +133,16 @@ Tuplet_engraver::process_music ()
            }
          else if (!bracket->get_bound (RIGHT))
            {
-             bracket->set_bound (RIGHT,
-                                 bracket->get_bound (LEFT));
-             number->set_bound (RIGHT,
-                                stopped_tuplets_[i].bracket_->get_bound (LEFT));
-           }
-         
+             if (bracket->get_bound (LEFT))
+               {
+                 bracket->set_bound (RIGHT,
+                                     bracket->get_bound (LEFT));
+                 number->set_bound (RIGHT,
+                                    stopped_tuplets_[i].bracket_->get_bound (LEFT));
+               }
+             else
+               programming_error ("stopped tuplet bracket has left nor right bound.");
+           }     
          // todo: scrap last_tuplets_, use stopped_tuplets_ only.
          // clear stopped_tuplets_ at start_translation_timestep
          last_tuplets_.push_back (bracket);