1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 02:54:03 +00:00

Specify exact exception type

This commit is contained in:
antonkomarev 2019-09-26 07:43:12 +03:00
parent 0d83c58cb6
commit d137293aa5

View file

@ -5,6 +5,7 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Middleware; namespace Stancl\Tenancy\Middleware;
use Closure; use Closure;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
class InitializeTenancy class InitializeTenancy
{ {
@ -31,7 +32,7 @@ class InitializeTenancy
{ {
try { try {
tenancy()->init(); tenancy()->init();
} catch (\Exception $e) { } catch (TenantCouldNotBeIdentifiedException $e) {
($this->onFail)($e); ($this->onFail)($e);
} }