Skip to content

Commit

Permalink
Core\Error -> Core\Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 30, 2014
1 parent ed9494e commit ef8cedf
Show file tree
Hide file tree
Showing 119 changed files with 254 additions and 254 deletions.
4 changes: 2 additions & 2 deletions src/Auth/BaseAuthorize.php
Expand Up @@ -16,7 +16,7 @@

use Cake\Controller\ComponentRegistry;
use Cake\Controller\Controller;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Core\InstanceConfigTrait;
use Cake\Network\Request;
use Cake\Utility\Inflector;
Expand Down Expand Up @@ -94,7 +94,7 @@ abstract public function authorize($user, Request $request);
*
* @param Controller $controller null to get, a controller to set.
* @return mixed
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function controller(Controller $controller = null) {
if ($controller) {
Expand Down
4 changes: 2 additions & 2 deletions src/Auth/ControllerAuthorize.php
Expand Up @@ -15,7 +15,7 @@
namespace Cake\Auth;

use Cake\Controller\Controller;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Network\Request;

/**
Expand Down Expand Up @@ -43,7 +43,7 @@ class ControllerAuthorize extends BaseAuthorize {
*
* @param Controller $controller null to get, a controller to set.
* @return mixed
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function controller(Controller $controller = null) {
if ($controller) {
Expand Down
10 changes: 5 additions & 5 deletions src/Cache/Cache.php
Expand Up @@ -15,7 +15,7 @@
namespace Cake\Cache;

use Cake\Cache\Engine\NullEngine;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Core\StaticConfigTrait;

/**
Expand Down Expand Up @@ -61,7 +61,7 @@
* @param string $name Name of the configuration
* @param array $config Optional associative array of settings passed to the engine
* @return array [engine, settings] on success, false on failure
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
class Cache {

Expand Down Expand Up @@ -100,7 +100,7 @@ class Cache {
*
* @param string $name Name of the config array that needs an engine instance built
* @return void
* @throws \Cake\Core\Error\Exception When a cache engine cannot be created.
* @throws \Cake\Core\Exception\Exception When a cache engine cannot be created.
*/
protected static function _buildEngine($name) {
if (empty(static::$_registry)) {
Expand Down Expand Up @@ -213,7 +213,7 @@ public static function write($key, $value, $config = 'default') {
* @param array $data An array of data to be stored in the cache
* @param string $config Optional string configuration name to write to. Defaults to 'default'
* @return array of bools for each key provided, indicating true for success or false for fail
* @throws Cake\Core\Error\Exception
* @throws Cake\Core\Exception\Exception
*/
public static function writeMany($data, $config = 'default') {
$engine = static::engine($config);
Expand Down Expand Up @@ -394,7 +394,7 @@ public static function clearGroup($group, $config = 'default') {
*
* @param string $group group name or null to retrieve all group mappings
* @return array map of group and all configuration that has the same group
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public static function groupConfigs($group = null) {
if ($group === null) {
Expand Down
6 changes: 3 additions & 3 deletions src/Cache/CacheRegistry.php
Expand Up @@ -15,7 +15,7 @@
namespace Cake\Cache;

use Cake\Core\App;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Core\ObjectRegistry;

/**
Expand Down Expand Up @@ -48,7 +48,7 @@ protected function _resolveClassName($class) {
* @param string $class The classname that is missing.
* @param string $plugin The plugin the cache is missing in.
* @return void
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
protected function _throwMissingClassError($class, $plugin) {
throw new Exception(sprintf('Cache engine %s is not available.', $class));
Expand All @@ -63,7 +63,7 @@ protected function _throwMissingClassError($class, $plugin) {
* @param string $alias The alias of the object.
* @param array $config An array of settings to use for the cache engine.
* @return CacheEngine The constructed CacheEngine class.
* @throws \Cake\Core\Error\Exception when an object doesn't implement
* @throws \Cake\Core\Exception\Exception when an object doesn't implement
* the correct interface.
*/
protected function _create($class, $alias, $config) {
Expand Down
6 changes: 3 additions & 3 deletions src/Cache/Engine/FileEngine.php
Expand Up @@ -16,7 +16,7 @@

use Cake\Cache\CacheEngine;
use Cake\Core\Configure;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Utility\Inflector;

/**
Expand Down Expand Up @@ -320,7 +320,7 @@ protected function _clearDirectory($path, $now, $threshold) {
* @param string $key The key to decrement
* @param int $offset The number to offset
* @return void
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function decrement($key, $offset = 1) {
throw new Exception('Files cannot be atomically decremented.');
Expand All @@ -332,7 +332,7 @@ public function decrement($key, $offset = 1) {
* @param string $key The key to decrement
* @param int $offset The number to offset
* @return void
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function increment($key, $offset = 1) {
throw new Exception('Files cannot be atomically incremented.');
Expand Down
10 changes: 5 additions & 5 deletions src/Cache/Engine/MemcachedEngine.php
Expand Up @@ -15,7 +15,7 @@
namespace Cake\Cache\Engine;

use Cake\Cache\CacheEngine;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Utility\Inflector;
use \Memcached;

Expand Down Expand Up @@ -94,7 +94,7 @@ class MemcachedEngine extends CacheEngine {
*
* @param array $config array of setting for the engine
* @return bool True if the engine has been successfully initialized, false if not
* @throws \Cake\Core\Error\Exception when you try use authentication without Memcached compiled with SASL support
* @throws \Cake\Core\Exception\Exception when you try use authentication without Memcached compiled with SASL support
*/
public function init(array $config = []) {
if (!class_exists('Memcached')) {
Expand Down Expand Up @@ -166,7 +166,7 @@ public function init(array $config = []) {
* Settings the memcached instance
*
* @return void
* @throws \Cake\Core\Error\Exception when the Memcached extension is not built with the desired serializer engine
* @throws \Cake\Core\Exception\Exception when the Memcached extension is not built with the desired serializer engine
*/
protected function _setOptions() {
$this->_Memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
Expand Down Expand Up @@ -303,7 +303,7 @@ public function readMany($keys) {
* @param string $key Identifier for the data
* @param int $offset How much to increment
* @return bool|int New incremented value, false otherwise
* @throws \Cake\Core\Error\Exception when you try to increment with compress = true
* @throws \Cake\Core\Exception\Exception when you try to increment with compress = true
*/
public function increment($key, $offset = 1) {
$key = $this->_key($key);
Expand All @@ -317,7 +317,7 @@ public function increment($key, $offset = 1) {
* @param string $key Identifier for the data
* @param int $offset How much to subtract
* @return bool|int New decremented value, false otherwise
* @throws \Cake\Core\Error\Exception when you try to decrement with compress = true
* @throws \Cake\Core\Exception\Exception when you try to decrement with compress = true
*/
public function decrement($key, $offset = 1) {
$key = $this->_key($key);
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Error/ConsoleException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Console\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Exception class for Console libraries. This exception will be thrown from Console library
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Error/MissingShellException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Console\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Used when a shell cannot be found.
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Error/MissingShellMethodException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Console\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Used when a shell method cannot be found.
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Error/MissingTaskException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Console\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Used when a Task cannot be found.
Expand Down
4 changes: 2 additions & 2 deletions src/Console/ShellDispatcher.php
Expand Up @@ -16,7 +16,7 @@

use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Utility\Inflector;

/**
Expand Down Expand Up @@ -100,7 +100,7 @@ public static function run($argv) {
* Defines current working environment.
*
* @return void
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
protected function _initEnvironment() {
if (!$this->_bootstrap()) {
Expand Down
6 changes: 3 additions & 3 deletions src/Controller/Component/AuthComponent.php
Expand Up @@ -19,7 +19,7 @@
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Error;
use Cake\Error\Debugger;
use Cake\Event\Event;
Expand Down Expand Up @@ -484,7 +484,7 @@ public function isAuthorized($user = null, Request $request = null) {
* Loads the authorization objects configured.
*
* @return mixed Either null when authorize is empty, or the loaded authorization objects.
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function constructAuthorize() {
if (empty($this->_config['authorize'])) {
Expand Down Expand Up @@ -742,7 +742,7 @@ public function identify() {
* Loads the configured authentication objects.
*
* @return mixed either null on empty authenticate value, or an array of loaded objects.
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function constructAuthenticate() {
if (empty($this->_config['authenticate'])) {
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Component/RequestHandlerComponent.php
Expand Up @@ -19,7 +19,7 @@
use Cake\Controller\Controller;
use Cake\Core\App;
use Cake\Core\Configure;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Event\Event;
use Cake\Network\Response;
use Cake\Routing\Router;
Expand Down Expand Up @@ -636,7 +636,7 @@ public function mapAlias($alias) {
* be the handling callback, all other arguments should be additional parameters
* for the handler.
* @return void
* @throws \Cake\Core\Error\Exception
* @throws \Cake\Core\Exception\Exception
*/
public function addInputType($type, $handler) {
if (!is_array($handler) || !isset($handler[0]) || !is_callable($handler[0])) {
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Controller.php
Expand Up @@ -14,7 +14,7 @@
*/
namespace Cake\Controller;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Event\Event;
use Cake\Event\EventListener;
use Cake\Event\EventManagerTrait;
Expand Down Expand Up @@ -350,7 +350,7 @@ public function setRequest(Request $request) {
* exists and isn't private.
*
* @return mixed The resulting response.
* @throws \Cake\Core\Error\Exception When request is not set.
* @throws \Cake\Core\Exception\Exception When request is not set.
* @throws \Cake\Controller\Error\PrivateActionException When actions are not public or prefixed by _
* @throws \Cake\Controller\Error\MissingActionException When actions are not defined.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Error/MissingActionException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Controller\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Missing Action exception - used when a controller action
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Error/MissingComponentException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Controller\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Used when a component cannot be found.
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Error/MissingControllerException.php
Expand Up @@ -13,7 +13,7 @@
*/
namespace Cake\Controller\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Missing Controller exception - used when a controller
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Error/PrivateActionException.php
Expand Up @@ -15,7 +15,7 @@
*/
namespace Cake\Controller\Error;

use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;

/**
* Private Action exception - used when a controller action
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Configure.php
Expand Up @@ -17,7 +17,7 @@
use Cake\Cache\Cache;
use Cake\Core\Configure\ConfigEngineInterface;
use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Utility\Hash;

/**
Expand Down Expand Up @@ -281,7 +281,7 @@ public static function load($key, $config = 'default', $merge = true) {
* @param array $keys The name of the top-level keys you want to dump.
* This allows you save only some data stored in Configure.
* @return bool success
* @throws \Cake\Core\Error\Exception if the adapter does not implement a `dump` method.
* @throws \Cake\Core\Exception\Exception if the adapter does not implement a `dump` method.
*/
public static function dump($key, $config = 'default', $keys = []) {
$engine = static::_getEngine($config);
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Configure/Engine/IniConfig.php
Expand Up @@ -16,7 +16,7 @@

use Cake\Core\Configure\ConfigEngineInterface;
use Cake\Core\Plugin;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Utility\Hash;

/**
Expand Down Expand Up @@ -92,7 +92,7 @@ public function __construct($path = null, $section = null) {
* @param string $key The identifier to read from. If the key has a . it will be treated
* as a plugin prefix. The chosen file must be on the engine's path.
* @return array Parsed configuration values.
* @throws \Cake\Core\Error\Exception when files don't exist.
* @throws \Cake\Core\Exception\Exception when files don't exist.
* Or when files contain '..' as this could lead to abusive reads.
*/
public function read($key) {
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Configure/Engine/PhpConfig.php
Expand Up @@ -15,7 +15,7 @@
namespace Cake\Core\Configure\Engine;

use Cake\Core\Configure\ConfigEngineInterface;
use Cake\Core\Error\Exception;
use Cake\Core\Exception\Exception;
use Cake\Core\Plugin;

/**
Expand Down Expand Up @@ -55,7 +55,7 @@ public function __construct($path = null) {
* @param string $key The identifier to read from. If the key has a . it will be treated
* as a plugin prefix.
* @return array Parsed configuration values.
* @throws \Cake\Core\Error\Exception when files don't exist or they don't contain `$config`.
* @throws \Cake\Core\Exception\Exception when files don't exist or they don't contain `$config`.
* Or when files contain '..' as this could lead to abusive reads.
*/
public function read($key) {
Expand Down
Expand Up @@ -11,7 +11,7 @@
* @since 3.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Core\Error;
namespace Cake\Core\Exception;

/**
* Base class that all CakePHP Exceptions extend.
Expand Down

0 comments on commit ef8cedf

Please sign in to comment.