|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jp.terasoluna.fw.exception.SystemException
public class SystemException
フレームワークから発生する汎用例外クラス。
処理の続行が困難な場合にフレームワークから発生する例外クラス。
本クラスにはメッセージキーとメッセージ置換文字列を設定することができる。
但し、メッセージ取得、及びプレースホルダの置換は別のクラスで実行し、
再度 setMessage(String) を実行してメッセージを設定する必要がある。
メッセージが設定されていない状態で、getMessage()
メソッドを用いてメッセージを取得するとメッセージキーが返却される。
従って、メッセージ置換が行えないような状況で本クラスを使用する場合は、
コンストラクタのerrorCodeに、メッセージキーではなくエラーコードや
エラーメッセージを直接設定すること。
| コンストラクタの概要 | |
|---|---|
SystemException(Throwable cause)
コンストラクタ。 |
|
SystemException(Throwable cause,
String errorCode)
コンストラクタ。 |
|
SystemException(Throwable cause,
String errorCode,
String s0)
コンストラクタ。 |
|
SystemException(Throwable cause,
String errorCode,
String[] optionStrings)
コンストラクタ。 |
|
SystemException(Throwable cause,
String errorCode,
String s0,
String s1)
コンストラクタ。 |
|
SystemException(Throwable cause,
String errorCode,
String s0,
String s1,
String s2)
コンストラクタ。 |
|
SystemException(Throwable cause,
String errorCode,
String s0,
String s1,
String s2,
String s3)
コンストラクタ。 |
|
| メソッドの概要 | |
|---|---|
String |
getErrorCode()
エラーコードを取得する。 |
String |
getMessage()
エラーメッセージを返却する。 |
String[] |
getOptions()
エラーメッセージの置換文字列を取得する。 |
void |
setMessage(String message)
エラーメッセージを格納する。 |
| クラス java.lang.Throwable から継承されたメソッド |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public SystemException(Throwable cause)
cause - 原因となった例外
public SystemException(Throwable cause,
String errorCode)
cause - 原因となった例外errorCode - エラーコード
public SystemException(Throwable cause,
String errorCode,
String[] optionStrings)
cause - 原因となった例外errorCode - エラーコードoptionStrings - メッセージ中の{n}を置換する文字列の配列
public SystemException(Throwable cause,
String errorCode,
String s0)
cause - 原因となった例外errorCode - エラーコードs0 - エラーメッセージ中の{0}を置換する文字列
public SystemException(Throwable cause,
String errorCode,
String s0,
String s1)
cause - 原因となった例外errorCode - エラーコードs0 - エラーメッセージ中の{0}を置換する文字列s1 - エラーメッセージ中の{1}を置換する文字列
public SystemException(Throwable cause,
String errorCode,
String s0,
String s1,
String s2)
cause - 原因となった例外errorCode - エラーコードs0 - エラーメッセージ中の{0}を置換する文字列s1 - エラーメッセージ中の{1}を置換する文字列s2 - エラーメッセージ中の{2}を置換する文字列
public SystemException(Throwable cause,
String errorCode,
String s0,
String s1,
String s2,
String s3)
cause - 原因となった例外errorCode - エラーコードs0 - エラーメッセージ中の{0}を置換する文字列s1 - エラーメッセージ中の{1}を置換する文字列s2 - エラーメッセージ中の{2}を置換する文字列s3 - エラーメッセージ中の{3}を置換する文字列| メソッドの詳細 |
|---|
public String getErrorCode()
public String[] getOptions()
public void setMessage(String message)
message - エラーメッセージpublic String getMessage()
setMessage(String) を用いてメッセージが設定されていない
場合は、コンストラクタのerrorCodeに指定した文字列を返却する。
Throwable 内の getMessage
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||