Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit c1d5998

Browse files
viktorproggerarrilot
authored andcommitted
Фикс возвращаемого кода команды при исключениях (#19)
* Фикс возвращаемого кода команды при исключениях * Фикс возвращаемого кода команды при исключениях
1 parent 14cff6f commit c1d5998

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Commands/AbstractCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
5656
} catch (Exception $e) {
5757
$this->error($e->getMessage());
5858
$this->error('Abort!');
59-
}
6059

61-
return;
60+
return $e->getCode();
61+
}
6262
}
6363

6464
/**

src/Exceptions/MigrationException.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66

77
class MigrationException extends Exception
88
{
9+
protected $code = 255;
910
}

0 commit comments

Comments
 (0)