diff --git a/framework/core/src/Install/Controller/InstallController.php b/framework/core/src/Install/Controller/InstallController.php index 835a6e312..d86db5caa 100644 --- a/framework/core/src/Install/Controller/InstallController.php +++ b/framework/core/src/Install/Controller/InstallController.php @@ -11,9 +11,9 @@ namespace Flarum\Install\Controller; -use Exception; use Flarum\Http\SessionAuthenticator; use Flarum\Install\Installation; +use Flarum\Install\StepFailed; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Http\Server\RequestHandlerInterface; @@ -102,8 +102,8 @@ class InstallController implements RequestHandlerInterface try { $pipeline->run(); - } catch (Exception $e) { - return new Response\HtmlResponse($e->getMessage(), 500); + } catch (StepFailed $e) { + return new Response\HtmlResponse($e->getPrevious()->getMessage(), 500); } $session = $request->getAttribute('session');