OSDN Git Service

3a37fb2f884be7cd059aad1dff0c094d10edcaa5
[mikutoga/TogaGem.git] / src / main / java / jp / sourceforge / mikutoga / parser / MmdEofException.java
1 /*
2  * unexpected file EOF founded exception
3  *
4  * License : The MIT License
5  * Copyright(c) 2010 MikuToga Partners
6  */
7
8 package jp.sourceforge.mikutoga.parser;
9
10 /**
11  * 入力ソースが予期せずに終了した異常系。
12  */
13 @SuppressWarnings("serial")
14 public class MmdEofException extends MmdFormatException {
15
16     /**
17      * コンストラクタ。
18      */
19     public MmdEofException(){
20         this(null);
21         return;
22     }
23
24     /**
25      * コンストラクタ。
26      * @param message エラーメッセージ
27      */
28     public MmdEofException(String message){
29         this(message, -1L);
30         return;
31     }
32
33     /**
34      * コンストラクタ。
35      * @param position 入力ソース先頭からのエラー位置。(バイト単位)
36      * 負の値を与えると、エラー位置は無効と解釈される。
37      */
38     public MmdEofException(long position){
39         this(null, position);
40         return;
41     }
42
43     /**
44      * コンストラクタ。
45      * @param message エラーメッセージ
46      * @param position 入力ソース先頭からのエラー位置。(バイト単位)
47      * 負の値を与えると、エラー位置は無効と解釈される。
48      */
49     public MmdEofException(String message, long position){
50         super(message, position);
51         return;
52     }
53
54 }