Skip to content

Commit d5acc95

Browse files
authored
Merge pull request #402 from cakephp/5.x-fix-fatal-error
fix fatal error because FatalErrorException was not found
2 parents 31d4c4b + 9f1987b commit d5acc95

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Command/FileRenameCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Cake\Console\ConsoleIo;
2222
use Cake\Console\ConsoleOptionParser;
2323
use Cake\Core\Configure;
24+
use Cake\Core\Exception\CakeException;
2425
use DirectoryIterator;
2526
use RecursiveDirectoryIterator;
2627
use RecursiveIteratorIterator;
@@ -304,7 +305,7 @@ protected function renameWithCasing(string $source, string $dest): void
304305
* @param string $source Source path.
305306
* @param string $dest Destination path.
306307
* @return void
307-
* @throws \Cake\Error\FatalErrorException When we're unable to move the folder via git.
308+
* @throws \Cake\Core\Exception\CakeException When we're unable to move the folder via git.
308309
*/
309310
protected function rename(string $source, string $dest): void
310311
{
@@ -327,7 +328,7 @@ protected function rename(string $source, string $dest): void
327328
$returnVar = null;
328329
$lastLine = exec("git mv $source $dest", $gitOutput, $returnVar);
329330
if ($returnVar) {
330-
throw new FatalErrorException(sprintf(
331+
throw new CakeException(sprintf(
331332
'Unable to move: %s to : %s - Reason: %s - Hint: Maybe you have uncommited changes in git.',
332333
$source,
333334
$dest,

0 commit comments

Comments
 (0)