http://codereview.appspot.com/5715053/diff/2001/lily/engraver-scheme.cc
File lily/engraver-scheme.cc (right):

http://codereview.appspot.com/5715053/diff/2001/lily/engraver-scheme.cc#newcode42
lily/engraver-scheme.cc:42: programming_error ("cannot create grob");
This gives no helpful indication of where the error occured, and
triggers problems later in unrelated code.  That's not better than a
segfault: neither is better than "something that shouldn't happened
somewhere".

You could check whether "cause" is a grob in which case you can call
unsmob_grob (cause)->programming_error on it in order to give the error
message a _source_ indicator, or a stream-event in which case
unsmob_event (cause)->origin ()->programming_error would deliver a
suitable source indicator for the error.

http://codereview.appspot.com/5715053/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to