1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 23:14:05 +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;
use Closure;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
class InitializeTenancy
{
@ -31,7 +32,7 @@ class InitializeTenancy
{
try {
tenancy()->init();
} catch (\Exception $e) {
} catch (TenantCouldNotBeIdentifiedException $e) {
($this->onFail)($e);
}