From c76f205bcbb54c1e9b1a44abf6844a86e8d8ce90 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 28 Aug 2010 00:18:46 -0400 Subject: [PATCH] Adding exceptions file. --- cake/libs/exceptions.php | 108 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 cake/libs/exceptions.php diff --git a/cake/libs/exceptions.php b/cake/libs/exceptions.php new file mode 100644 index 000000000..1a3c62f90 --- /dev/null +++ b/cake/libs/exceptions.php @@ -0,0 +1,108 @@ +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; + } +} \ No newline at end of file