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:
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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue