Browse Source

Merge pull request #9154 from RusAlex/9149_print_migrationPath_in_error_message

9149 print migration path in error message
tags/2.0.6
Carsten Brandt 9 years ago
parent
commit
86b8ddf697
  1. 1
      framework/CHANGELOG.md
  2. 2
      framework/console/controllers/BaseMigrateController.php

1
framework/CHANGELOG.md

@ -45,6 +45,7 @@ Yii Framework 2 Change Log
- Enh #8903: PostgreSQL `QueryBuilder::createIndex()` can now specify the index method to use (LAV45)
- Enh #9011: Allow `yii\widgets\MaskedInput` to produce an input tag of a custom type (TriAnMan)
- Enh #9038: Write warning to log in case `FileCache` fails to write into file (foccy)
- Enh #9149: Print directory migrationPath in a `yii migrate` command error. (RusAlex)
- Chg #6354: `ErrorHandler::logException()` will now log the whole exception object instead of only its string representation (cebe)
- Chg #8556: Extracted `yii\web\User::getAuthManager()` method (samdark)

2
framework/console/controllers/BaseMigrateController.php

@ -68,7 +68,7 @@ abstract class BaseMigrateController extends Controller
$path = Yii::getAlias($this->migrationPath);
if (!is_dir($path)) {
if ($action->id !== 'create') {
throw new Exception('Migration failed. Directory specified in migrationPath doesn\'t exist.');
throw new Exception("Migration failed. Directory specified in migrationPath doesn\'t exist: {$this->migrationPath}");
}
FileHelper::createDirectory($path);
}

Loading…
Cancel
Save