Skip to content
Permalink
Browse files

Fixing more errors related to namespace changes

  • Loading branch information...
lorenzo committed Aug 30, 2014
1 parent 0b5672b commit 18ed6de193ff23aa887e49ade4c029b89544dff9
Showing with 9 additions and 9 deletions.
  1. +5 −5 src/Network/Response.php
  2. +3 −3 src/Network/Socket.php
  3. +1 −1 src/ORM/Error/RecordNotFoundException.php
@@ -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;
@@ -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(
@@ -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)) {
@@ -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());
@@ -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) {
@@ -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);
}
}
@@ -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

0 comments on commit 18ed6de

Please sign in to comment.
You can’t perform that action at this time.