]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/music-constructor.cc
* scm/define-grob-properties.scm: remove 'type
[lilypond.git] / lily / music-constructor.cc
index dc60a9deb430555adb858c94bd54a5b3031ddbcd..31427ecdead1d3703649df9428b19c99bae1ef8e 100644 (file)
@@ -3,12 +3,16 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2001--2002  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include <map>                 // UGH.
+#include <assert.h>
+
+#include "warn.hh"
 #include "music-constructor.hh"
+
 typedef Music* (*Music_ctor) ();
 
 static std::map<String,Music_ctor> *ctors_map_;
@@ -33,8 +37,13 @@ get_music_ctor (String s)
 }
 
 Music* 
-get_music (String s)
+make_music (String s)
 {
-  return (*get_music_ctor (s)) ();
+  Music_ctor c = get_music_ctor (s);
+  if (!c)
+    programming_error (String ("No constructor for music: ") + s);
+  assert (c);
+  
+  return (*c) ();
 }