Skip to content

Commit

Permalink
Removing dependency on the Network namespace in the ORM
Browse files Browse the repository at this point in the history
Instead, make the RecordNotFound exception send the correct error number
  • Loading branch information
lorenzo committed Aug 30, 2014
1 parent 240f586 commit aa4f1b5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/ORM/Error/RecordNotFoundException.php
Expand Up @@ -14,12 +14,23 @@
*/
namespace Cake\ORM\Error;

use Cake\Network\Exception\NotFoundException;
use RuntimeException;

/**
* Exception raised when a particular record was not found
*
*/
class RecordNotFoundException extends NotFoundException {
class RecordNotFoundException extends RuntimeException {

/**
* Constructor.
*
* @param string $message The error message
* @param int $code The code of the error, is also the HTTP status code for the error.
* @param \Exception $previous the previous exception.
*/
public function __construct($message, $code = 404, $previous = null) {
parent::__construct($message, $code, $previous);
}

}

0 comments on commit aa4f1b5

Please sign in to comment.