Skip to content

Commit f0ae717

Browse files
committed
Outuput for Exception in Whitelist command
1 parent 50a085d commit f0ae717

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/Developer/Console/Command/TablesWhitelistGenerateCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Developer\Model\Setup\Declaration\Schema\WhitelistGenerator;
1111
use Magento\Framework\Config\FileResolverByModule;
1212
use Magento\Framework\Exception\ConfigurationMismatchException;
13+
use Magento\Framework\Console\Cli;
1314
use Symfony\Component\Console\Command\Command;
1415
use Symfony\Component\Console\Input\InputInterface;
1516
use Symfony\Component\Console\Input\InputOption;
@@ -80,11 +81,12 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
8081
$this->whitelistGenerator->generate($moduleName);
8182
} catch (ConfigurationMismatchException $e) {
8283
$output->writeln($e->getMessage());
83-
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
84+
return Cli::RETURN_FAILURE;
8485
} catch (\Exception $e) {
85-
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
86+
$output->writeln($e->getMessage());
87+
return Cli::RETURN_FAILURE;
8688
}
8789

88-
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
90+
return Cli::RETURN_SUCCESS;
8991
}
9092
}

0 commit comments

Comments
 (0)