OSDN Git Service

52bebf62d4343e512e64108a36b712d722697f6a
[mikutoga/Pmd2XML.git] / src / main / java / jp / sfjp / mikutoga / pmd / xml / BotherHandler.java
1 /*
2  * XML custom error-handler
3  *
4  * License : The MIT License
5  * Copyright(c) 2010 MikuToga Partners
6  */
7
8 package jp.sfjp.mikutoga.pmd.xml;
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 public final class BotherHandler implements ErrorHandler{
19
20     /**
21      * 唯一のシングルトン。
22      */
23     public static final ErrorHandler HANDLER = new BotherHandler();
24
25     /**
26      * 隠しコンストラクタ。
27      */
28     private BotherHandler(){
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 }