From: Han-Wen Nienhuys Date: Mon, 17 Mar 2008 15:04:15 +0000 (-0300) Subject: Clean up error messages in case of unattached tuplet bracket. X-Git-Tag: release/2.11.43-1~29^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=329153e48fef22eca9bdef056318823827cf3bdd;p=lilypond.git Clean up error messages in case of unattached tuplet bracket. --- diff --git a/lily/spanner.cc b/lily/spanner.cc index e73399dae0..0ae372ded3 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -191,7 +191,7 @@ Spanner::set_bound (Direction d, Grob *s) Item *i = dynamic_cast (s); if (!i) { - programming_error ("must have Item for spanner bound"); + programming_error ("must have Item for spanner bound of " + name()); return; } diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index 478469a1e2..5cd637e3f9 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -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);