Skip to content

Commit

Permalink
Better error message (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkusebauch authored Jun 7, 2021
1 parent ab8a81a commit c4bbc5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Console/Command/AbstractConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ protected function validateConsumerName(string $consumerName): void

} catch (ConsumerFactoryException $e) {
throw new \InvalidArgumentException(
sprintf(
"Consumer [$consumerName] does not exist. \n\n Available consumers: %s",
$e->getMessage() . sprintf(
"\n\n Available consumers: %s",
implode('', array_map(static function($s): string {
return "\n\t- [{$s}]";
}, $this->consumersDataBag->getDataKeys()))
Expand Down

0 comments on commit c4bbc5f

Please sign in to comment.