exception = $exception; } /** * {@inheritdoc} */ public function when(callable $onResolved) { try { $onResolved($this->exception, null); } catch (\Throwable $exception) { ErrorHandler::notify($exception); } } /** * {@inheritdoc} */ public function listen(callable $onNext) {} }