Package nablarch.fw.handler
Class GlobalErrorHandler
java.lang.Object
nablarch.fw.handler.GlobalErrorHandler
- All Implemented Interfaces:
 ExceptionHandler,Handler<Request<?>,Object> 
public class GlobalErrorHandler
extends Object
implements Handler<Request<?>,Object>, ExceptionHandler 
異例処理用例外ハンドラ。
 
 このハンドラは、リクエストコントローラの直後に配置され、
 ハンドラキュー上のどのハンドラでも捕捉されなかった例外に対して
 最終的に処理を行う責務を持ったハンドラである。
 
 ほとんどのエラーは各処理方式に準じた例外ハンドラーにより捕捉されるが、
 それらのハンドラが捕捉しないエラー、もしくは、それらのハンドラ以降の
 処理で発生したエラーが対象となる。
 
 このハンドラが例外処理として行うのは以下の2点である。
 1. ログ出力
 2. コントローラに対する例外のリスロー
 (コントローラ自体の処理継続が不可能な致命的エラーの場合。)
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionhandle(Request<?> req, ExecutionContext context) 入力データに対する処理を実行する。handleError(Error e, ExecutionContext context) Error の例外処理を行う。
例外をNablarchのハンドラでレスポンスとして処理する場合、 このハンドラより外部のハンドラが処理できるレスポンスオブジェクトを返す。handleRuntimeException(RuntimeException e, ExecutionContext context) RuntimeExceptionの例外処理を行う。
例外をNablarchのハンドラでレスポンスとして処理する場合、 このハンドラより外部のハンドラが処理できるレスポンスオブジェクトを返す。 
- 
Constructor Details
- 
GlobalErrorHandler
public GlobalErrorHandler() 
 - 
 - 
Method Details
- 
handle
入力データに対する処理を実行する。 - 
handleError
Description copied from interface:ExceptionHandlerError の例外処理を行う。
例外をNablarchのハンドラでレスポンスとして処理する場合、 このハンドラより外部のハンドラが処理できるレスポンスオブジェクトを返す。- Specified by:
 handleErrorin interfaceExceptionHandler- Parameters:
 e- 処理するErrorcontext- ExecutionContext- Returns:
 - 例外を表すレスポンスオブジェクト
 - Throws:
 Error- 例外を処理できない場合RuntimeException- 例外を処理できない場合、または付け替えた例外
 - 
handleRuntimeException
public Result handleRuntimeException(RuntimeException e, ExecutionContext context) throws RuntimeException Description copied from interface:ExceptionHandlerRuntimeExceptionの例外処理を行う。
例外をNablarchのハンドラでレスポンスとして処理する場合、 このハンドラより外部のハンドラが処理できるレスポンスオブジェクトを返す。- Specified by:
 handleRuntimeExceptionin interfaceExceptionHandler- Parameters:
 e- 処理する例外context- ExecutionContext- Returns:
 - 例外を表すレスポンスオブジェクト
 - Throws:
 RuntimeException- 例外を処理できない場合、または付け替えた例外
 
 -