]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/translator-ctors.cc
Really fix #741.
[lilypond.git] / lily / translator-ctors.cc
index 65bfa015fe5984b7057d56ab6b196c43425a55a2..ab1a7db144faf370a56b45bacd1549b1354ea2e6 100644 (file)
@@ -3,10 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "translator.hh"
+
+#include "international.hh"
 #include "scm-hash.hh"
 #include "warn.hh"
 
@@ -17,7 +19,8 @@
 Scheme_hash_table *global_translator_dict = 0;
 
 LY_DEFINE (get_all_translators, "ly:get-all-translators", 0, 0, 0, (),
-          "Return a list of all translator objects that may be instantiated. ")
+          "Return a list of all translator objects that may be"
+          " instantiated.")
 {
   SCM l = global_translator_dict ? global_translator_dict->to_alist () : SCM_EOL;
 
@@ -47,7 +50,10 @@ get_translator (SCM sym)
     global_translator_dict->try_retrieve (sym, &v);
 
   if (v == SCM_BOOL_F)
-    error (_f ("unknown translator: `%s'", ly_symbol2string (sym).c_str ()));
+    {
+      warning (_f ("unknown translator: `%s'", ly_symbol2string (sym).c_str ()));
+      return 0;
+    }
 
   return unsmob_translator (v);
 }