1 /*
2  * Copyright (C) 2006-2021 Registro.br. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met:
7  * 1. Redistribution of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY REGISTRO.BR ``AS IS AND ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIE OF FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
16  * EVENT SHALL REGISTRO.BR BE LIABLE FOR ANY DIRECT, INDIRECT,
17  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
19  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
21  * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
22  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
23  * DAMAGE.
24  */
25 /* $Id$ */
26 
27 #include <config.h>
28 
29 #include "DomErrorHandler.H"
30 #include "DomParser.H"
31 #include "XmlException.H"
32 
33 XERCES_CPP_NAMESPACE_USE
34 
35 LIBEPP_NICBR_NS_BEGIN
36 
warning(const SAXParseException & exception)37 void DomErrorHandler::warning(const SAXParseException& exception)
38 {
39 
40 }
41 
error(const SAXParseException & exception)42 void DomErrorHandler::error(const SAXParseException& exception)
43 {
44 	string message = DomParser::str_transcode(exception.getMessage());
45 	throw XmlException(XmlException::INVALID_XML_DOCUMENT,
46 	                   "The XML document is invalid", message);
47 }
48 
fatalError(const SAXParseException & exception)49 void DomErrorHandler::fatalError(const SAXParseException& exception)
50 {
51 	string message = DomParser::str_transcode(exception.getMessage());
52 	throw XmlException(XmlException::INVALID_XML_DOCUMENT,
53 	                   "The XML document is invalid", message);
54 }
55 
resetErrors()56 void DomErrorHandler::resetErrors()
57 {
58 
59 }
60 
61 LIBEPP_NICBR_NS_END
62