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

@ -67,10 +67,4 @@ class ComponentCollection extends ObjectCollection {
return $this->_loaded[$name];
}
}
/**
* Exceptions used by the ComponentCollection.
*/
class MissingComponentFileException extends RuntimeException { }
class MissingComponentClassException extends RuntimeException { }
}

View file

@ -273,10 +273,4 @@ class BehaviorCollection extends ObjectCollection {
return $this->__methods;
}
}
/**
* Runtime Exceptions for behaviors
*/
class MissingBehaviorFileException extends RuntimeException { }
class MissingBehaviorClassException extends RuntimeException { }
}

View file

@ -273,8 +273,4 @@ class ConnectionManager {
session_write_close();
}
}
}
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 { }