Line data Source code
1 : // file : xsd/cxx/tree/error-handler.txx
2 : // copyright : Copyright (c) 2005-2017 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 0 : 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 0 : diagnostics_.push_back (
20 0 : error<C> (s == severity::warning
21 0 : ? tree::severity::warning
22 : : tree::severity::error, id, line, column, message));
23 :
24 0 : if (!failed_ && s != severity::warning)
25 0 : failed_ = true;
26 :
27 0 : return true;
28 : }
29 : }
30 : }
31 : }
|