Permalink
Browse files

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.
  • Loading branch information...
1 parent 0d82652 commit 5b641287e9c2ba53d2a3c3c4f0519ae0ed5ed363 @markstory markstory committed Sep 4, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Cake/Console/Command/SchemaShell.php
@@ -281,7 +281,9 @@ protected function _loadSchema() {
$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;

0 comments on commit 5b64128

Please sign in to comment.