diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php
index <HASH>..<HASH> 100644
--- a/cake/libs/model/connection_manager.php
+++ b/cake/libs/model/connection_manager.php
@@ -222,7 +222,7 @@ class ConnectionManager {
 				$this->_connectionsEnum[$name] = $this->__connectionData($config);
 			}
 		} else {
-			$this->cakeError('missingConnection', array(array('className' => 'ConnectionManager')));
+			throw new MissingConnectionException('ConnectionManager');
 		}
 	}
 
@@ -274,3 +274,7 @@ class ConnectionManager {
 		}
 	}
 }
+
+
+class MissingDatabaseException extends RuntimeException {}
+class MissingConnectionException extends RuntimeException {}
\ No newline at end of file
diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php
index <HASH>..<HASH> 100644
--- a/cake/libs/model/model.php
+++ b/cake/libs/model/model.php
@@ -2825,7 +2825,7 @@ class Model extends Object {
 		}
 
 		if (empty($db) || !is_object($db)) {
-			return $this->cakeError('missingConnection', array(array('className' => $this->alias)));
+			throw new MissingConnectionException($this->useDbConfig);
 		}
 	}
Replacing cakeError calls with exceptions in ConnectionManager and Model.