mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 01:44:03 +00:00
Custom exceptions, fix #91
This commit is contained in:
parent
a8936a4c73
commit
4c676b41e9
6 changed files with 32 additions and 6 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace Stancl\Tenancy\StorageDrivers;
|
||||
|
||||
use Illuminate\Support\Facades\Redis;
|
||||
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
|
||||
use Stancl\Tenancy\Interfaces\StorageDriver;
|
||||
|
||||
class RedisStorageDriver implements StorageDriver
|
||||
|
|
@ -18,7 +19,7 @@ class RedisStorageDriver implements StorageDriver
|
|||
{
|
||||
$id = $this->getTenantIdByDomain($domain);
|
||||
if (! $id) {
|
||||
throw new \Exception("Tenant could not be identified on domain {$domain}");
|
||||
throw new TenantCouldNotBeIdentifiedException($domain);
|
||||
}
|
||||
|
||||
return $this->getTenantById($id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue