public ExecutionChain setErrorCallback ( ErrorCallback callback ) { if ( state . get ( ) == State . RUNNING ) { throw new IllegalStateException ( "Invalid while ExecutionChain is running" ) ; } errorCallback = callback ; return this ; }
Set a callback to handle any exceptions in the chain of execution .