mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix: replace \Exception with BadMethodCallException
This commit is contained in:
parent
3fa8a26177
commit
3a35769b19
@ -15,6 +15,7 @@ namespace CodeIgniter\Cache\Handlers;
|
||||
|
||||
use Closure;
|
||||
use CodeIgniter\Cache\CacheInterface;
|
||||
use CodeIgniter\Exceptions\BadMethodCallException;
|
||||
use CodeIgniter\Exceptions\InvalidArgumentException;
|
||||
use Config\Cache;
|
||||
use Exception;
|
||||
@ -108,6 +109,6 @@ abstract class BaseHandler implements CacheInterface
|
||||
*/
|
||||
public function deleteMatching(string $pattern)
|
||||
{
|
||||
throw new Exception('The deleteMatching method is not implemented.');
|
||||
throw new BadMethodCallException('The deleteMatching method is not implemented.');
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace CodeIgniter\Cache\Handlers;
|
||||
|
||||
use CodeIgniter\Exceptions\BadMethodCallException;
|
||||
use CodeIgniter\Exceptions\CriticalError;
|
||||
use CodeIgniter\I18n\Time;
|
||||
use Config\Cache;
|
||||
@ -197,7 +198,7 @@ class MemcachedHandler extends BaseHandler
|
||||
*/
|
||||
public function deleteMatching(string $pattern)
|
||||
{
|
||||
throw new Exception('The deleteMatching method is not implemented for Memcached. You must select File, Redis or Predis handlers to use it.');
|
||||
throw new BadMethodCallException('The deleteMatching method is not implemented for Memcached. You must select File, Redis or Predis handlers to use it.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,9 +13,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace CodeIgniter\Cache\Handlers;
|
||||
|
||||
use CodeIgniter\Exceptions\BadMethodCallException;
|
||||
use CodeIgniter\I18n\Time;
|
||||
use Config\Cache;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Cache handler for WinCache from Microsoft & IIS.
|
||||
@ -80,7 +80,7 @@ class WincacheHandler extends BaseHandler
|
||||
*/
|
||||
public function deleteMatching(string $pattern)
|
||||
{
|
||||
throw new Exception('The deleteMatching method is not implemented for Wincache. You must select File, Redis or Predis handlers to use it.');
|
||||
throw new BadMethodCallException('The deleteMatching method is not implemented for Wincache. You must select File, Redis or Predis handlers to use it.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user