OSDN Git Service

implement XML SAX handler.
[jindolf/Jindolf.git] / src / main / java / jp / sfjp / jindolf / data / 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.jindolf.data.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  * <p>例外を渡されれば即投げ返す。
18  */
19 public final class BotherHandler implements ErrorHandler{
20
21     /**
22      * 唯一のシングルトン。
23      */
24     public static final ErrorHandler HANDLER = new BotherHandler();
25
26
27     /**
28      * 隠しコンストラクタ。
29      */
30     private BotherHandler(){
31         super();
32         return;
33     }
34
35
36     /**
37      * {@inheritDoc}
38      *
39      * @param exception {@inheritDoc}
40      * @throws SAXException {@inheritDoc}
41      */
42     @Override
43     public void error(SAXParseException exception) throws SAXException{
44         throw exception;
45     }
46
47     /**
48      * {@inheritDoc}
49      *
50      * @param exception {@inheritDoc}
51      * @throws SAXException {@inheritDoc}
52      */
53     @Override
54     public void fatalError(SAXParseException exception) throws SAXException{
55         throw exception;
56     }
57
58     /**
59      * {@inheritDoc}
60      *
61      * @param exception {@inheritDoc}
62      * @throws SAXException {@inheritDoc}
63      */
64     @Override
65     public void warning(SAXParseException exception) throws SAXException{
66         throw exception;
67     }
68
69 }