]> git.donarmstrong.com Git - lilypond.git/blob - src/warn.cc
release: 0.0.22
[lilypond.git] / src / warn.cc
1 #include "debug.hh"
2 #include "lexer.hh"
3 #include "moment.hh"
4
5 ostream &warnout (cerr);
6 ostream *mlog(&cerr);
7
8 void
9 warning(String s)
10 {
11     WARN << s;
12 }
13
14
15 void
16 error(String s)
17 {
18     if (busy_parsing())
19         yyerror(s);
20     else
21         cerr <<  "\nerror: " << s << "\n";
22         
23     exit(1);
24 }
25
26 void
27 error_t(const String& s, Moment r)
28 {
29     String e=s+ "(t = " + String(r) + ")";
30     error(e);
31     exit(1);
32 }
33