mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 05:44:04 +00:00
Custom exceptions, fix #91
This commit is contained in:
parent
a8936a4c73
commit
4c676b41e9
6 changed files with 32 additions and 6 deletions
11
src/Exceptions/DatabaseManagerNotRegisteredException.php
Normal file
11
src/Exceptions/DatabaseManagerNotRegisteredException.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Exceptions;
|
||||
|
||||
class DatabaseManagerNotRegisteredException extends \Exception
|
||||
{
|
||||
public function __construct($error, $driver)
|
||||
{
|
||||
$this->message = "$error: no database manager for driver $driver is registered.";
|
||||
}
|
||||
}
|
||||
11
src/Exceptions/TenantCouldNotBeIdentifiedException.php
Normal file
11
src/Exceptions/TenantCouldNotBeIdentifiedException.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Exceptions;
|
||||
|
||||
class TenantCouldNotBeIdentifiedException extends \Exception
|
||||
{
|
||||
public function __construct($domain)
|
||||
{
|
||||
$this->message = "Tenant could not be identified on domain $domain";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue