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

This commit is contained in:
mark_story 2010-08-28 00:08:35 -04:00
parent f0d938c1cb
commit dc67b9cacc
8 changed files with 4 additions and 85 deletions

View file

@ -27,6 +27,7 @@ error_reporting(E_ALL & ~E_DEPRECATED);
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';

View file

@ -85,9 +85,3 @@ class TaskCollection extends ObjectCollection {
}
}
/**
* Exceptions used by the TaskCollection.
*/
class MissingTaskFileException extends RuntimeException { }
class MissingTaskClassException extends RuntimeException { }

View file

@ -652,10 +652,3 @@ class Dispatcher extends Object {
header($header);
}
}
/**
* Runtime Exceptions for dispatcher.
*/
class MissingControllerException extends RuntimeException {}
class MissingActionException extends RuntimeException {}
class PrivateActionException extends RuntimeException {}

View file

@ -68,9 +68,3 @@ class ComponentCollection extends ObjectCollection {
}
}
/**
* Exceptions used by the ComponentCollection.
*/
class MissingComponentFileException extends RuntimeException { }
class MissingComponentClassException extends RuntimeException { }

View file

@ -274,9 +274,3 @@ class BehaviorCollection extends ObjectCollection {
}
}
/**
* Runtime Exceptions for behaviors
*/
class MissingBehaviorFileException extends RuntimeException { }
class MissingBehaviorClassException extends RuntimeException { }

View file

@ -274,7 +274,3 @@ class ConnectionManager {
}
}
}
class MissingDatabaseException extends RuntimeException {}
class MissingConnectionException extends RuntimeException {}

View file

@ -3064,53 +3064,3 @@ class Model extends Object {
}
}
/**
* 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;
}
}

View file

@ -855,6 +855,3 @@ class View extends Object {
return $this->__paths;
}
}
class MissingViewException extends RuntimeException { }
class MissingLayoutException extends RuntimeException { }