Skip to content
Permalink
Browse files

Moving all the exceptions into one file for the short term.

  • Loading branch information...
markstory committed Aug 28, 2010
1 parent f0d938c commit dc67b9cacc91c116f0b978f526be1b22c0d25e6f
@@ -27,6 +27,7 @@
require CORE_PATH . 'cake' . DS . 'basics.php';
$TIME_START = microtime(true);
require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php';
require LIBS . 'exceptions.php';
require LIBS . 'object.php';
require LIBS . 'inflector.php';
require LIBS . 'configure.php';
@@ -85,9 +85,3 @@ protected function _getPath($file) {
}
}
/**
* Exceptions used by the TaskCollection.
*/
class MissingTaskFileException extends RuntimeException { }
class MissingTaskClassException extends RuntimeException { }
@@ -652,10 +652,3 @@ public function header($header) {
header($header);
}
}
/**
* Runtime Exceptions for dispatcher.
*/
class MissingControllerException extends RuntimeException {}
class MissingActionException extends RuntimeException {}
class PrivateActionException extends RuntimeException {}
@@ -67,10 +67,4 @@ public function load($component, $settings = array(), $enable = true) {
return $this->_loaded[$name];
}
}
/**
* Exceptions used by the ComponentCollection.
*/
class MissingComponentFileException extends RuntimeException { }
class MissingComponentClassException extends RuntimeException { }
}
@@ -273,10 +273,4 @@ public function methods() {
return $this->__methods;
}
}
/**
* Runtime Exceptions for behaviors
*/
class MissingBehaviorFileException extends RuntimeException { }
class MissingBehaviorClassException extends RuntimeException { }
}
@@ -273,8 +273,4 @@ function __destruct() {
session_write_close();
}
}
}
class MissingDatabaseException extends RuntimeException {}
class MissingConnectionException extends RuntimeException {}
}
@@ -3064,53 +3064,3 @@ function __wakeup() {
}
}
/**
* Exception class to be thrown when a database table is not found in the datasource
*
*/
class MissingTableException extends RuntimeException {
/**
* The name of the model wanting to load the database table
*
* @var string
*/
protected $model;
/**
* The name of the missing table
*
* @var string
*/
protected $table;
/**
* Exception costructor
*
* @param string $model The name of the model wanting to load the database table
* @param string $table The name of the missing table
* @return void
*/
public function __construct($model, $table) {
$this->model = $model;
$this->$table = $table;
$message = sprintf(__('Database table %s for model %s was not found.'), $table, $model);
parent::__construct($message);
}
/**
* Returns the name of the model wanting to load the database table
*
* @return string
*/
public function getModel() {
return $this->model;
}
/**
* Returns the name of the missing table
*
* @return string
*/
public function getTable() {
return $this->table;
}
}
@@ -855,6 +855,3 @@ protected function _paths($plugin = null, $cached = true) {
return $this->__paths;
}
}
class MissingViewException extends RuntimeException { }
class MissingLayoutException extends RuntimeException { }

0 comments on commit dc67b9c

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