]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4439/1: Use Input::non_fatal_error instead of Input::error where appropriate
authorDavid Kastrup <dak@gnu.org>
Wed, 10 Jun 2015 09:34:47 +0000 (11:34 +0200)
committerDavid Kastrup <dak@gnu.org>
Wed, 17 Jun 2015 05:10:12 +0000 (07:10 +0200)
lily/lily-lexer.cc
lily/lily-parser.cc
lily/parse-scm.cc
lily/score.cc

index f2c0d1863733a4bb8d342f4780d114aa459cdceb..d9d284864f3676489cd6c6841e52ddd66f1bac22 100644 (file)
@@ -299,7 +299,7 @@ Lily_lexer::LexerError (char const *s)
     {
       error_level_ |= 1;
       Input spot (*lexloc_);
-      spot.error (s);
+      spot.non_fatal_error (s);
     }
 }
 
index 93d9a055c7fec9dd563190425a2fcad03c73e962..170a5e77e4a2736157db88a80a2b0ba87cfdb10d 100644 (file)
@@ -189,14 +189,14 @@ Lily_parser::clear ()
 void
 Lily_parser::parser_error (const string &s)
 {
-  lexer_->here_input ().error (_ (s.c_str ()));
+  lexer_->here_input ().non_fatal_error (_ (s.c_str ()));
   error_level_ = 1;
 }
 
 void
 Lily_parser::parser_error (Input const &i, const string &s)
 {
-  i.error (s);
+  i.non_fatal_error (s);
   error_level_ = 1;
 }
 
index c83866849fd164c9597b6b29d80347ff69b1bcae..9db184c2ae0f107fcad38f2e13151a95d94a7c2d 100644 (file)
@@ -120,7 +120,8 @@ parse_handler (void *data, SCM /*tag*/, SCM args)
 {
   Parse_start *ps = (Parse_start *) data;
 
-  ps->location_.error (_ ("GUILE signaled an error for the expression beginning here"));
+  ps->location_.non_fatal_error
+    (_ ("GUILE signaled an error for the expression beginning here"));
 
   if (scm_ilength (args) > 2)
     scm_display_error_message (scm_cadr (args), scm_caddr (args), scm_current_error_port ());
index fe0f761fb7bad81ebf8dcdb2077b9d007a1f7097..895954a01abbfc0aa534683c9cc753c72d7bd98b 100644 (file)
@@ -157,22 +157,24 @@ Score::set_music (SCM music)
 {
   if (unsmob<Music> (music_))
     {
-      unsmob<Music> (music)->origin ()->error (_ ("already have music in score"));
-      unsmob<Music> (music_)->origin ()->error (_ ("this is the previous music"));
+      unsmob<Music> (music)->origin ()->non_fatal_error
+        (_ ("already have music in score"));
+      unsmob<Music> (music_)->origin ()->non_fatal_error
+        (_ ("this is the previous music"));
     }
   Music *m = unsmob<Music> (music);
   if (m && to_boolean (m->get_property ("error-found")))
     {
-      m->origin ()->error (_ ("errors found, ignoring music expression"));
+      m->origin ()->non_fatal_error
+        (_ ("errors found, ignoring music expression"));
 
-      this->error_found_ = this->error_found_
-                           || to_boolean (m->get_property ("error-found"));
+      error_found_ = true;
     }
 
-  if (this->error_found_)
-    this->music_ = SCM_EOL;
+  if (error_found_)
+    music_ = SCM_EOL;
   else
-    this->music_ = music;
+    music_ = music;
 }
 
 SCM