4 #include "timedescription.hh"
7 #include "sourcefile.hh"
11 ostream &warnout (cerr);
27 cerr << "\nerror: " << s << "\n";
33 error_t(const String& s, const Moment& r)
35 String t_mom = String(trunc(r)) + String(r - Moment(trunc(r)));
36 String e=s+ " (t = " + t_mom + ")";
41 error_t(const String& s, Time_description const &t_tdes)
43 String e=s+ " (at t=" + String(t_tdes.bars) + ": " + String(t_tdes.whole_in_measure) + ")\n";
48 message( String message_str, char const* context_ch_c_l )
50 String str = "lilypond: ";
51 Source_file* sourcefile_l = source_l->sourcefile_l( context_ch_c_l );
53 str += sourcefile_l->name_str() + ": ";
54 str += String( sourcefile_l->line_i( context_ch_c_l ) ) + ": ";
59 str += sourcefile_l->error_str( context_ch_c_l );
61 cerr << endl << str << endl;
65 warning( String message_str, char const* context_ch_c_l )
67 message( "warning: " + message_str, context_ch_c_l );
71 error( String message_str, char const* context_ch_c_l )
73 message( message_str, context_ch_c_l );