|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
public class Exception
Exception クラスとそのサブクラスは、通常のアプリケーションでキャッチされる可能性のある状態を示す Throwable の形式の 1 つです。
Error,
直列化された形式| コンストラクタの概要 | |
|---|---|
Exception()
詳細メッセージに null を使用して、新規例外を構築します。 |
|
Exception(String message)
指定された詳細メッセージを使用して、新規例外を構築します。 |
|
Exception(String message,
Throwable cause)
指定された詳細メッセージおよび原因を使用して新規例外を構築します。 |
|
Exception(Throwable cause)
指定された原因と詳細メッセージ (cause==null ? null : cause.toString()) を持つ、新しい例外を構築します (通常、クラスと原因の詳細メッセージを含みます)。 |
|
| メソッドの概要 |
|---|
| クラス java.lang.Throwable から継承されたメソッド |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public Exception()
null を使用して、新規例外を構築します。原因は初期化されず、その後 Throwable.initCause(java.lang.Throwable) を呼び出すことで初期化されます。
public Exception(String message)
Throwable.initCause(java.lang.Throwable) を呼び出すことで初期化されます。
message - 詳細メッセージ詳細メッセージは、あとで Throwable.getMessage() メソッドで取得するために保存される
public Exception(String message,
Throwable cause)
cause と関連付けられた詳細メッセージが、この例外の詳細メッセージに自動的に統合されることはありません。
message - 詳細メッセージ (あとで Throwable.getMessage() メソッドで取得するために保存される)cause - 原因 (あとで Throwable.getCause() メソッドで取得するために保存される)。(null 値が許可されており、原因が存在しないか不明であることを示す)public Exception(Throwable cause)
PrivilegedActionException など) のラッパーである場合に有用です。
cause - 原因 (あとで Throwable.getCause() メソッドで取得するために保存される)。(null 値が許可されており、原因が存在しないか不明であることを示す)
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。