Skip to content

Commit

Permalink
Changed CacheException to Exception. CacheException is removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Sep 8, 2013
1 parent 4f4e8a5 commit 19555ce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -312,10 +312,10 @@ protected function _clearDirectory($path, $now, $threshold) {
* @param string $key
* @param integer $offset
* @return void
* @throws Cake\Error\CacheException
* @throws Cake\Error\Exception
*/
public function decrement($key, $offset = 1) {
throw new Error\CacheException(__d('cake_dev', 'Files cannot be atomically decremented.'));
throw new Error\Exception(__d('cake_dev', 'Files cannot be atomically decremented.'));
}

/**
Expand All @@ -324,10 +324,10 @@ public function decrement($key, $offset = 1) {
* @param string $key
* @param integer $offset
* @return void
* @throws Cake\Error\CacheException
* @throws Cake\Error\Exception
*/
public function increment($key, $offset = 1) {
throw new Error\CacheException(__d('cake_dev', 'Files cannot be atomically incremented.'));
throw new Error\Exception(__d('cake_dev', 'Files cannot be atomically incremented.'));
}

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Cache/Engine/MemcacheEngine.php
Expand Up @@ -159,11 +159,11 @@ public function read($key) {
* @param string $key Identifier for the data
* @param integer $offset How much to increment
* @return New incremented value, false otherwise
* @throws Cake\Error\CacheException when you try to increment with compress = true
* @throws Cake\Error\Exception when you try to increment with compress = true
*/
public function increment($key, $offset = 1) {
if ($this->settings['compress']) {
throw new Error\CacheException(
throw new Error\Exception(
__d('cake_dev', 'Method %s not implemented for compressed cache in %s', 'increment()', __CLASS__)
);
}
Expand All @@ -176,11 +176,11 @@ public function increment($key, $offset = 1) {
* @param string $key Identifier for the data
* @param integer $offset How much to subtract
* @return New decremented value, false otherwise
* @throws Cake\Error\CacheException when you try to decrement with compress = true
* @throws Cake\Error\Exception when you try to decrement with compress = true
*/
public function decrement($key, $offset = 1) {
if ($this->settings['compress']) {
throw new Error\CacheException(
throw new Error\Exception(
__d('cake_dev', 'Method %s not implemented for compressed cache in %s', 'decrement()', __CLASS__)
);
}
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Cache/Engine/RedisEngine.php
Expand Up @@ -134,7 +134,6 @@ public function read($key) {
* @param string $key Identifier for the data
* @param integer $offset How much to increment
* @return New incremented value, false otherwise
* @throws CacheException when you try to increment with compress = true
*/
public function increment($key, $offset = 1) {
return (int)$this->_Redis->incrBy($key, $offset);
Expand All @@ -146,7 +145,6 @@ public function increment($key, $offset = 1) {
* @param string $key Identifier for the data
* @param integer $offset How much to subtract
* @return New decremented value, false otherwise
* @throws CacheException when you try to decrement with compress = true
*/
public function decrement($key, $offset = 1) {
return (int)$this->_Redis->decrBy($key, $offset);
Expand Down

0 comments on commit 19555ce

Please sign in to comment.