protected function solver($ex, $params = [])
    {
        $promise = Promise::doResolve();

        foreach ($this->handlers as $handler)
        {
            $current = $handler;

            $promise = $promise->then(
                function() use($ex, $params, $current) {
                    return Promise::doResolve($current->solve($ex, $params));
                }
            );
        }

        return $promise;
    }