|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException jp.hishidama.eval.EvalException
public class EvalException
演算エラークラス.
構文解析に失敗した場合や評価の実行に失敗した場合にスローされる。
フィールドの概要 | |
---|---|
static int |
EXP_FORBIDDEN_CALL
禁止されたメソッドを呼び出した. |
static int |
EXP_FUNC_CALL_ERROR
関数呼び出しの失敗 |
static int |
EXP_NOT_ARR_VALUE
配列値が取得できない |
static int |
EXP_NOT_DEF_OBJ
オブジェクトが未定義 |
static int |
EXP_NOT_DEF_VAR
変数が未定義 |
static int |
EXP_NOT_FLD_VALUE
フィールド値が取得できない |
static int |
EXP_NOT_LET
代入できない |
static int |
EXP_NOT_LET_ARR
配列に代入できない |
static int |
EXP_NOT_LET_FIELD
フィールドに代入できない |
static int |
EXP_NOT_LET_VAR
変数に代入できない |
static int |
EXP_NOT_NUMBER
数値として扱えない |
static int |
EXP_NOT_VAR_VALUE
変数値が取得できない |
static int |
EXP_NOT_VARIABLE
変数として扱えない |
static int |
PARSE_END_OF_STR
解釈の途中で文字列が終了した |
static int |
PARSE_INVALID_CHAR
未定義の文字 |
static int |
PARSE_INVALID_OP
未定義の演算子 |
static int |
PARSE_NOT_FOUND_END_OP
閉じ括弧が存在しない. |
static int |
PARSE_NOT_FUNC
関数として扱えない |
static int |
PARSE_STILL_EXIST
解釈が終了したのに文字列が残っている |
コンストラクタの概要 | |
---|---|
EvalException(int msg,
Lex lex)
コンストラクター |
|
EvalException(int msg,
String[] opt,
Lex lex)
コンストラクター |
|
EvalException(int msg,
String word,
String string,
int pos,
Throwable e)
コンストラクター |
メソッドの概要 | |
---|---|
String |
getDefaultFormat(String msgFmt)
デフォルトフォーマット取得 |
static String |
getErrCodeMessage(int code)
コード別メッセージ取得 |
int |
getErrorCode()
エラーコード取得 |
String[] |
getOption()
メッセージ付加情報取得 |
int |
getPos()
エラー発生位置取得 |
String |
getString()
解析前文字列取得 |
String |
getWord()
対象識別子取得 |
String |
toString()
|
String |
toString(String fmt)
エラーメッセージ取得. |
クラス java.lang.Throwable から継承されたメソッド |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
フィールドの詳細 |
---|
public static final int PARSE_NOT_FOUND_END_OP
%0:閉じ括弧
public static final int PARSE_INVALID_OP
public static final int PARSE_INVALID_CHAR
public static final int PARSE_END_OF_STR
public static final int PARSE_STILL_EXIST
public static final int PARSE_NOT_FUNC
public static final int EXP_FORBIDDEN_CALL
考えられる原因:
public static final int EXP_NOT_VARIABLE
public static final int EXP_NOT_NUMBER
public static final int EXP_NOT_LET
public static final int EXP_NOT_VAR_VALUE
public static final int EXP_NOT_LET_VAR
public static final int EXP_NOT_DEF_VAR
public static final int EXP_NOT_DEF_OBJ
public static final int EXP_NOT_ARR_VALUE
public static final int EXP_NOT_LET_ARR
public static final int EXP_NOT_FLD_VALUE
public static final int EXP_NOT_LET_FIELD
public static final int EXP_FUNC_CALL_ERROR
コンストラクタの詳細 |
---|
public EvalException(int msg, Lex lex)
msg
- エラーメッセージコードlex
- 字句解析位置public EvalException(int msg, String[] opt, Lex lex)
msg
- エラーメッセージコードopt
- エラーメッセージオプションlex
- 字句解析位置public EvalException(int msg, String word, String string, int pos, Throwable e)
msg
- エラーメッセージstring
- 対象文字列pos
- 位置e
- 原因となった例外メソッドの詳細 |
---|
public int getErrorCode()
public String[] getOption()
public String getWord()
public String getString()
public int getPos()
public static String getErrCodeMessage(int code)
code
- エラーコード
public String getDefaultFormat(String msgFmt)
msgFmt
- 主メッセージ
toString(String)
public String toString()
Throwable
内の toString
public String toString(String fmt)
フォーマットを元にメッセージを編集する。
%0〜9 | 付加情報の0〜9番。存在しない場合は空文字列 |
%c | エラーコード |
%s | 解析前の文字列 |
%p | エラーが発生した、解析前文字列内の位置 |
%w | エラーの原因となった文字列 |
%e | 何らかの例外発生でエラーとなった場合の、その例外 |
%% | 「%」 |
fmt
- フォーマット
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |