mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 17:04:04 +00:00
Catch broader range of exceptions (harden() in DB bootstrapper)
This commit is contained in:
parent
98a808bb98
commit
6ed9975e85
1 changed files with 2 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ use Stancl\Tenancy\Contracts\Tenant;
|
|||
use Stancl\Tenancy\Database\Contracts\TenantWithDatabase;
|
||||
use Stancl\Tenancy\Database\DatabaseManager;
|
||||
use Stancl\Tenancy\Database\Exceptions\TenantDatabaseDoesNotExistException;
|
||||
use Throwable;
|
||||
|
||||
class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
||||
{
|
||||
|
|
@ -54,7 +55,7 @@ class DatabaseTenancyBootstrapper implements TenancyBootstrapper
|
|||
if (static::$harden) {
|
||||
try {
|
||||
$this->harden($tenant);
|
||||
} catch (RuntimeException $e) {
|
||||
} catch (Throwable $e) {
|
||||
// Revert connection back to central
|
||||
$this->revert();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue