Make schema errors clearer.

When a schema fails because of the name, the error should display
the name & file name that it attempted to load. This gives people
a slightly better chance of figuring things out.
This commit is contained in:
mark_story 2012-09-03 21:06:48 -04:00
parent 0d826528e1
commit 5b641287e9

View file

@ -281,7 +281,9 @@ class SchemaShell extends AppShell {
$Schema = $this->Schema->load($options);
if (!$Schema) {
$this->err(__d('cake_console', '%s could not be loaded', $this->Schema->path . DS . $this->Schema->file));
$this->err(__d('cake_console', 'The chosen schema could not be loaded. Attempted to load:'));
$this->err(__d('cake_console', 'File: %s', $this->Schema->path . DS . $this->Schema->file));
$this->err(__d('cake_console', 'Name: %s', $this->Schema->name));
$this->_stop();
}
$table = null;