1
0
Fork 0
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:
Samuel Štancl 2019-08-20 12:14:56 +02:00
parent a8936a4c73
commit 4c676b41e9
6 changed files with 32 additions and 6 deletions

View file

@ -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);