MESSAGES
****************************************************************/
void
-Grob::warning (string s) const
+Grob::programming_error (string s) const
{
- if (get_program_option ("warning-as-error"))
- error (s);
+ SCM cause = self_scm ();
+ while (Grob *g = unsmob_grob (cause))
+ cause = g->get_property ("cause");
+ /* ES TODO: cause can't be Music*/
+ if (Music *m = unsmob_music (cause))
+ m->origin ()->programming_error (s);
+ else if (Stream_event *ev = unsmob_stream_event (cause))
+ ev->origin ()->programming_error (s);
+ else
+ ::programming_error (s);
+}
+
+void
+Grob::warning (string s) const
+{
SCM cause = self_scm ();
while (Grob *g = unsmob_grob (cause))
cause = g->get_property ("cause");
return scm_is_symbol (nm) ? ly_symbol2string (nm) : this->class_name ();
}
-void
-Grob::programming_error (string s) const
-{
- if (get_program_option ("warning-as-error"))
- error (s);
-
- SCM cause = self_scm ();
- while (Grob *g = unsmob_grob (cause))
- cause = g->get_property ("cause");
-
- s = _f ("programming error: %s", s);
-
- /* ES TODO: cause can't be Music*/
- if (Music *m = unsmob_music (cause))
- m->origin ()->message (s);
- else if (Stream_event *ev = unsmob_stream_event (cause))
- ev->origin ()->message (s);
- else
- ::message (s);
-}
-
ADD_INTERFACE (Grob,
"A grob represents a piece of music notation.\n"
"\n"