4 #include "time-description.hh"
7 #include "source-file.hh"
11 ostream
&warnout (cerr
);
27 cerr
<< "error: " << 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_i_
) + ": " + 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_g
->sourcefile_l( context_ch_c_l
);
53 str
+= sourcefile_l
->file_line_no_str(context_ch_c_l
) + String(": ");
58 str
+= sourcefile_l
->error_str( context_ch_c_l
);
66 warning( String message_str
, char const* context_ch_c_l
)
68 message( "warning: " + message_str
, context_ch_c_l
);
72 error( String message_str
, char const* context_ch_c_l
)
74 message( message_str
, context_ch_c_l
);
75 // since when exits error again?
76 // i-d say: error: errorlevel |= 1; -> no output upon error
77 // warning: recovery -> output (possibly wrong)
79 lexer
->errorlevel_i_
|= 1;