Branch data Line data Source code
1 : : // file : xsd/cxx/tree/error-handler.txx
2 : : // copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC
3 : : // license : GNU GPL v2 + exceptions; see accompanying LICENSE file
4 : :
5 : : namespace xsd
6 : : {
7 : : namespace cxx
8 : : {
9 : : namespace tree
10 : : {
11 : : template <typename C>
12 : 1 : bool error_handler<C>::
13 : : handle (const std::basic_string<C>& id,
14 : : unsigned long line,
15 : : unsigned long column,
16 : : severity s,
17 : : const std::basic_string<C>& message)
18 : : {
19 : 2 : diagnostics_.push_back (
20 : : error<C> (s == severity::warning
21 : : ? tree::severity::warning
22 : : : tree::severity::error, id, line, column, message));
23 : :
24 [ + - ][ - + ]: 1 : if (!failed_ && s != severity::warning)
[ + - ]
25 : 1 : failed_ = true;
26 : :
27 : 1 : return true;
28 : : }
29 : : }
30 : : }
31 : : }
|