X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finput.cc;h=f2ddedd4e8b619e61e45c933f8a8c25aa8170445;hb=f2bb61843cdd3e049945c4b56b80089eefb3f7a4;hp=3d998b384e6d806761ce122ede378e69cf200c8e;hpb=a276a19dc6bd57832db3107f2f2cbb04cb4677b6;p=lilypond.git diff --git a/lily/input.cc b/lily/input.cc index 3d998b384e..f2ddedd4e8 100644 --- a/lily/input.cc +++ b/lily/input.cc @@ -3,7 +3,7 @@ source file of the LilyPond music typesetter - (c) 1997--2007 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys */ #include "input.hh" @@ -12,8 +12,9 @@ using namespace std; #include "international.hh" +#include "program-option.hh" #include "source-file.hh" -#include "source.hh" +#include "sources.hh" #include "warn.hh" Input::Input (Input const &i) @@ -79,15 +80,22 @@ Input::message (string s) const void Input::programming_error (string s) const { - message (_f ("programming error: %s", s.c_str ())); - message (_ ("continuing, cross fingers") + "\n"); + if (get_program_option ("warning-as-error")) + ::error (s); + else { + message (_f ("programming error: %s", s.c_str ())); + message (_ ("continuing, cross fingers") + "\n"); + } } void Input::warning (string s) const { - message (_f ("warning: %s", s)); + if (get_program_option ("warning-as-error")) + ::error (s); + else + message (_f ("warning: %s", s)); } void