Skip to content

Commit af349d7

Browse files
committed
Use exception PreConditionNotMetException for pre-condition checks
1 parent 912a64b commit af349d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Console/DbUpgradeCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected function checkPreConditions(): void
145145
}
146146

147147
if (!$this->option('force') && !$this->confirm('Do you have a backup of your database?')) {
148-
throw new DbUpgradeException('You need to have a backup to perform the upgrade.');
148+
throw new PreConditionNotMetException('You need to have a backup to perform the upgrade.');
149149
}
150150

151151
$this->commandMysqlDump = $this->findExecutable('mysqldump');
@@ -393,7 +393,7 @@ protected function findExecutable($name): string
393393
$executable = $this->executableFinder->find($name);
394394

395395
if (!$executable) {
396-
throw new DbUpgradeException('Could not find executable ' . $name . ' on your system.');
396+
throw new PreConditionNotMetException('Could not find executable ' . $name . ' on your system.');
397397
}
398398

399399
return $executable;

0 commit comments

Comments
 (0)