From 563bb9fc1b7afd3543fe4ed9251d39a995db8737 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Wed, 10 Jun 2015 11:34:47 +0200 Subject: [PATCH] Issue 4439/1: Use Input::non_fatal_error instead of Input::error where appropriate --- lily/lily-lexer.cc | 2 +- lily/lily-parser.cc | 4 ++-- lily/parse-scm.cc | 3 ++- lily/score.cc | 18 ++++++++++-------- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index f2c0d18637..d9d284864f 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -299,7 +299,7 @@ Lily_lexer::LexerError (char const *s) { error_level_ |= 1; Input spot (*lexloc_); - spot.error (s); + spot.non_fatal_error (s); } } diff --git a/lily/lily-parser.cc b/lily/lily-parser.cc index 93d9a055c7..170a5e77e4 100644 --- a/lily/lily-parser.cc +++ b/lily/lily-parser.cc @@ -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; } diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index c83866849f..9db184c2ae 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -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 ()); diff --git a/lily/score.cc b/lily/score.cc index fe0f761fb7..895954a01a 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -157,22 +157,24 @@ Score::set_music (SCM music) { if (unsmob (music_)) { - unsmob (music)->origin ()->error (_ ("already have music in score")); - unsmob (music_)->origin ()->error (_ ("this is the previous music")); + unsmob (music)->origin ()->non_fatal_error + (_ ("already have music in score")); + unsmob (music_)->origin ()->non_fatal_error + (_ ("this is the previous music")); } Music *m = unsmob (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 -- 2.39.2