diff --git a/lib/Command/Export.php b/lib/Command/Export.php index 55458d65..9777b6b7 100644 --- a/lib/Command/Export.php +++ b/lib/Command/Export.php @@ -212,9 +212,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $io->writeln("Export saved in $folder/$exportName.zip"); } catch (\Exception $e) { if ($io->isDebug()) { - $io->error($e->getTraceAsString()); + $io->error("$e"); + } else { + $io->error($e->getMessage()); } - $io->error($e->getMessage()); return $e->getCode() !== 0 ? (int)$e->getCode() : 1; } diff --git a/lib/Command/Import.php b/lib/Command/Import.php index cf35f123..af145031 100644 --- a/lib/Command/Import.php +++ b/lib/Command/Import.php @@ -94,9 +94,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $io->writeln("Successfully imported from ${path}"); } catch (\Exception $e) { if ($io->isDebug()) { - $io->error($e->getTrace()); + $io->error("$e"); + } else { + $io->error($e->getMessage()); } - $io->error($e->getMessage()); return $e->getCode() !== 0 ? (int)$e->getCode() : 1; }