solve() public method

Returns FulfilledPromise if handler for exception does exist and was executed properly. If handler does not exist or other errors and/or exception were thrown then RejectedPromise is returned.
public solve ( Erro\Error | Exceptio\Exception $ex, mixed[] $params = [] ) : Kraken\Promise\PromiseInterface
$ex Erro\Error | Exceptio\Exception
$params mixed[]
return Kraken\Promise\PromiseInterface
Example #1
0
 /**
  * @param Error|Exception $ex
  * @param mixed[] $params
  */
 protected function handleException($ex, $params)
 {
     try {
         $this->supervisor->solve($ex, $params);
     } catch (Error $ex) {
         $this->supervisor->solve($ex, $params);
     } catch (Exception $ex) {
         $this->supervisor->solve($ex, $params);
     }
 }