aboutsummaryrefslogtreecommitdiff
path: root/src/support/error_handler.cc
blob: 9a898a6d141137562a498f0c0e13c48233f923b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "error_handler.h"

#include <xercesc/sax/SAXParseException.hpp>

#include <iostream>

#include "support/xerces_string_guard.h"

namespace InputXSLT {

ErrorHandler::ErrorHandler(const std::string& transformation):
	transformation_path_(transformation) { }

void ErrorHandler::warning(const xercesc::SAXParseException& e) {
	std::cerr << "Warning in "
	          << "'"
	          << this->transformation_path_
	          << "': "
	          << *XercesStringGuard<char>(e.getMessage())
	          << std::endl;
}

void ErrorHandler::error(const xercesc::SAXParseException& e) {
	std::cerr << "Error in "
	          << "'"
	          << this->transformation_path_
	          << "': "
	          << *XercesStringGuard<char>(e.getMessage())
	          << std::endl;
}

void ErrorHandler::fatalError(const xercesc::SAXParseException& e) {
	std::cerr << "Fatal error in "
	          << "'"
	          << this->transformation_path_
	          << "': "
	          << *XercesStringGuard<char>(e.getMessage())
	          << std::endl;
}

void ErrorHandler::resetErrors() { }

}