mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 01:14:03 +00:00
Specify exact exception type
This commit is contained in:
parent
0d83c58cb6
commit
d137293aa5
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue