Skip to content

Commit

Permalink
Fixing more errors related to namespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 30, 2014
1 parent 0b5672b commit 18ed6de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/Network/Response.php
Expand Up @@ -15,7 +15,7 @@
namespace Cake\Network;

use Cake\Core\Configure;
use Cake\Error;
use Cake\Network\Exception\NotFoundException;
use Cake\Utility\File;
use InvalidArgumentException;
use RuntimeException;
Expand Down Expand Up @@ -1332,7 +1332,7 @@ protected function _normalizeCorsDomains($domains, $requestIsSSL = false) {
* to a file, `APP` will be prepended to the path.
* @param array $options Options See above.
* @return void
* @throws \Cake\Error\NotFoundException
* @throws \Cake\Network\Exception\NotFoundException
*/
public function file($path, array $options = array()) {
$options += array(
Expand All @@ -1341,7 +1341,7 @@ public function file($path, array $options = array()) {
);

if (strpos($path, '..') !== false) {
throw new Error\NotFoundException('The requested file contains `..` and will not be read.');
throw new NotFoundException('The requested file contains `..` and will not be read.');
}

if (!is_file($path)) {
Expand All @@ -1351,9 +1351,9 @@ public function file($path, array $options = array()) {
$file = new File($path);
if (!$file->exists() || !$file->readable()) {
if (Configure::read('debug')) {
throw new Error\NotFoundException(sprintf('The requested file %s was not found or not readable', $path));
throw new NotFoundException(sprintf('The requested file %s was not found or not readable', $path));
}
throw new Error\NotFoundException(__d('cake', 'The requested file was not found'));
throw new NotFoundException(__d('cake', 'The requested file was not found'));
}

$extension = strtolower($file->ext());
Expand Down
6 changes: 3 additions & 3 deletions src/Network/Socket.php
Expand Up @@ -354,7 +354,7 @@ public function reset($state = null) {
* @param bool $enable enable or disable encryption. Default is true (enable)
* @return bool True on success
* @throws \InvalidArgumentException When an invalid encryption scheme is chosen.
* @throws \Cake\Network\Error\SocketException When attempting to enable SSL/TLS fails
* @throws \Cake\Network\Exception\SocketException When attempting to enable SSL/TLS fails
* @see stream_socket_enable_crypto
*/
public function enableCrypto($type, $clientOrServer = 'client', $enable = true) {
Expand All @@ -366,15 +366,15 @@ public function enableCrypto($type, $clientOrServer = 'client', $enable = true)
$enableCryptoResult = stream_socket_enable_crypto($this->connection, $enable, $this->_encryptMethods[$type . '_' . $clientOrServer]);
} catch (\Exception $e) {
$this->setLastError(null, $e->getMessage());
throw new Error\SocketException($e->getMessage());
throw new SocketException($e->getMessage());
}
if ($enableCryptoResult === true) {
$this->encrypted = $enable;
return true;
}
$errorMessage = 'Unable to perform enableCrypto operation on the current socket';
$this->setLastError(null, $errorMessage);
throw new Error\SocketException($errorMessage);
throw new SocketException($errorMessage);
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Error/RecordNotFoundException.php
Expand Up @@ -14,7 +14,7 @@
*/
namespace Cake\ORM\Error;

use Cake\Error\NotFoundException;
use Cake\Network\Exception\NotFoundException;

/**
* Exception raised when a particular record was not found
Expand Down

0 comments on commit 18ed6de

Please sign in to comment.