]> git.saurik.com Git - apple/icu.git/blame - icuSources/samples/xml2txt/DOMTreeErrorReporter.cpp
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / samples / xml2txt / DOMTreeErrorReporter.cpp
CommitLineData
b75a7d8f
A
1/******************************************************************************
2 * Copyright (C) 2002, International Business Machines Corporation and
3 * others. All Rights Reserved.
4 ******************************************************************************/
5// ---------------------------------------------------------------------------
6// Includes
7// ---------------------------------------------------------------------------
8#include <sax/SAXParseException.hpp>
9#include "DOMTreeErrorReporter.hpp"
10#include <iostream.h>
11#include <stdlib.h>
12#include <string.h>
13#include <dom/DOMString.hpp>
14
15extern ostream& operator<<(ostream& target, const DOMString& s);
16
17void DOMTreeErrorReporter::warning(const SAXParseException&)
18{
19}
20
21void DOMTreeErrorReporter::error(const SAXParseException& toCatch)
22{
23 fSawErrors = true;
24 cerr << "Error at file \"" << DOMString(toCatch.getSystemId())
25 << "\", line " << toCatch.getLineNumber()
26 << ", column " << toCatch.getColumnNumber()
27 << "\n Message: " << DOMString(toCatch.getMessage()) << endl;
28}
29
30void DOMTreeErrorReporter::fatalError(const SAXParseException& toCatch)
31{
32 fSawErrors = true;
33 cerr << "Fatal Error at file \"" << DOMString(toCatch.getSystemId())
34 << "\", line " << toCatch.getLineNumber()
35 << ", column " << toCatch.getColumnNumber()
36 << "\n Message: " << DOMString(toCatch.getMessage()) << endl;
37}
38
39void DOMTreeErrorReporter::resetErrors()
40{
41}