インターフェース ErrorAttributes
- すべての既知の実装クラス:
DefaultErrorAttributes
public interface ErrorAttributes
ログに記録したり、ユーザーに提示したりできるエラー属性へのアクセスを提供します。
- 導入:
- 4.0.0
- 作成者:
- Brian Clozel, Scott Frederick
- 関連事項:
メソッドのサマリー
修飾子と型メソッド説明@Nullable ThrowableSEgetError(ServerRequest request) エラーの根本的な原因を返すか、エラーを抽出できない場合はnullを返します。getErrorAttributes(ServerRequest request, ErrorAttributeOptions options) エラー属性のMapSE を返します。voidstoreErrorInformation(ThrowableSE error, ServerWebExchange exchange) 指定されたエラー情報を現在のServerWebExchangeに保存します。
メソッドの詳細
getErrorAttributes
default MapSE<StringSE, @Nullable ObjectSE> getErrorAttributes(ServerRequest request, ErrorAttributeOptions options) エラー属性のMapSE を返します。マップは、エラーページのモデルとして使用するか、ServerResponse本文として返すことができます。- パラメーター:
request- ソースリクエストoptions- エラー属性コンテンツのオプション- 戻り値:
- エラー属性のマップ
getError
エラーの根本的な原因を返すか、エラーを抽出できない場合はnullを返します。- パラメーター:
request- ソース ServerRequest- 戻り値:
- エラーまたは
nullの原因となったExceptionSE
storeErrorInformation
指定されたエラー情報を現在のServerWebExchangeに保存します。- パラメーター:
error- エラーの原因となったExceptionSEexchange- ソース交換