public class ResponseStatusException extends NestedRuntimeException
コンストラクターと説明 |
---|
ResponseStatusException(HttpStatus status) レスポンスステータスを持つコンストラクター。 |
ResponseStatusException(HttpStatus status, StringSE reason) 説明として例外メッセージに追加するレスポンスステータスと理由を持つコンストラクター。 |
ResponseStatusException(HttpStatus status, StringSE reason, ThrowableSE cause) 説明として例外メッセージに追加するレスポンスステータスと理由、およびネストされた例外を持つコンストラクター。 |
ResponseStatusException(int rawStatusCode, StringSE reason, ThrowableSE cause) 説明として例外メッセージに追加するレスポンスステータスと理由、およびネストされた例外を持つコンストラクター。 |
修飾子と型 | メソッドと説明 |
---|---|
MapSE<StringSE, StringSE> | getHeaders() 使用すべきではありません。 5.1.13 現在、 getResponseHeaders() を推奨 |
StringSE | getMessage() ネストされた例外がある場合は、その例外からのメッセージを含む詳細メッセージを返します。 |
int | getRawStatusCode() HTTP ステータスコード(非標準であり、 HttpStatus 列挙型で解決できない可能性があります)を整数として返します。 |
StringSE | getReason() 例外を説明する理由(潜在的に null または空)。 |
HttpHeaders | getResponseHeaders() エラーレスポンスに追加する必要がある例外に関連付けられたヘッダーを返します。 |
HttpStatus | getStatus() この例外に関連付けられた HTTP ステータスを返します。 |
contains, getMostSpecificCause, getRootCause
addSuppressedSE, fillInStackTraceSE, getCauseSE, getLocalizedMessageSE, getStackTraceSE, getSuppressedSE, initCauseSE, printStackTraceSE, printStackTraceSE, printStackTraceSE, setStackTraceSE, toStringSE
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public ResponseStatusException(HttpStatus status)
status
- HTTP ステータス (必須)public ResponseStatusException(HttpStatus status, @Nullable StringSE reason)
status
- HTTP ステータス (必須)reason
- 関連する理由 (オプション)public ResponseStatusException(HttpStatus status, @Nullable StringSE reason, @Nullable ThrowableSE cause)
status
- HTTP ステータス (必須)reason
- 関連する理由 (オプション)cause
- 入れ子の例外 (オプション)public ResponseStatusException(int rawStatusCode, @Nullable StringSE reason, @Nullable ThrowableSE cause)
rawStatusCode
- HTTP ステータスコード値 reason
- 関連する理由 (オプション)cause
- 入れ子の例外 (オプション)public HttpStatus getStatus()
IllegalArgumentExceptionSE
- 不明な HTTP ステータスコードの場合 HttpStatus.valueOf(int)
public int getRawStatusCode()
HttpStatus
列挙型で解決できない可能性があります)を整数として返します。getStatus()
, HttpStatus.resolve(int)
@DeprecatedSE public MapSE<StringSE,StringSE> getHeaders()
getResponseHeaders()
を推奨 このクラスのデフォルト実装は空のマップを返します。
public HttpHeaders getResponseHeaders()
このクラスのデフォルト実装は空のヘッダーを返します。
public StringSE getMessage()
NestedRuntimeException
NestedRuntimeException
の getMessage