OSDN Git Service

1.102.5-SNAPSHOT開発開始
[mikutoga/Pmd2XML.git] / src / main / java / jp / sourceforge / mikutoga / pmd2xml / XmlHandler.java
1 /*
2  * XML custom error-handler
3  *
4  * License : The MIT License
5  * Copyright(c) 2010 MikuToga Partners
6  */
7
8 package jp.sourceforge.mikutoga.pmd2xml;
9
10 import org.xml.sax.ErrorHandler;
11 import org.xml.sax.SAXException;
12 import org.xml.sax.SAXParseException;
13
14 /**
15  * 自製エラーハンドラ。
16  * 例外を渡されれば即投げる。
17  */
18 final class XmlHandler implements ErrorHandler{
19
20     /**
21      * 唯一のシングルトン。
22      */
23     static final ErrorHandler HANDLER = new XmlHandler();
24
25     /**
26      * 隠しコンストラクタ。
27      */
28     private XmlHandler(){
29         super();
30         return;
31     }
32
33     /**
34      * {@inheritDoc}
35      * @param exception {@inheritDoc}
36      * @throws SAXException {@inheritDoc}
37      */
38     @Override
39     public void error(SAXParseException exception) throws SAXException{
40         throw exception;
41     }
42
43     /**
44      * {@inheritDoc}
45      * @param exception {@inheritDoc}
46      * @throws SAXException {@inheritDoc}
47      */
48     @Override
49     public void fatalError(SAXParseException exception) throws SAXException{
50         throw exception;
51     }
52
53     /**
54      * {@inheritDoc}
55      * @param exception {@inheritDoc}
56      * @throws SAXException {@inheritDoc}
57      */
58     @Override
59     public void warning(SAXParseException exception) throws SAXException{
60         throw exception;
61     }
62
63 }