]> git.donarmstrong.com Git - lilypond.git/commitdiff
(discretionary_processing): look up origin for
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 Aug 2005 00:41:56 +0000 (00:41 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 26 Aug 2005 00:41:56 +0000 (00:41 +0000)
programming_error too.

lily/grob.cc

index 1343cea45381eb8044323807ee226ef94c453fb2..b8b82271ca9803444bf7d7a77565b296abe15f35 100644 (file)
@@ -629,8 +629,16 @@ Grob::warning (String s) const
 void
 Grob::programming_error (String s) const
 {
+  SCM cause = self_scm ();
+  while (Grob *g = unsmob_grob (cause))
+    cause = g->get_property ("cause");
+
   s = _f ("programming error: %s", s);
-  message (s);
+
+  if (Music *m = unsmob_music (cause))
+    m->origin ()->message (s);
+  else
+    ::message (s);
 }
 void
 Grob::discretionary_processing ()