mirror of
https://github.com/flarum/framework.git
synced 2024-12-02 15:03:44 +08:00
Catch pipeline's own exception
This commit is contained in:
parent
9a415670a3
commit
b678367498
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue
Block a user