Skip to content

Commit

Permalink
Task: Log exception if Tracy exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Apr 8, 2020
1 parent c11862a commit 997dd31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/OrmSchemaUpdateTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Baraja\PackageManager\Helpers;
use Contributte\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Tracy\Debugger;

/**
* Priority: 99
Expand All @@ -29,6 +30,9 @@ public function run(): bool
$app->setAutoExit(false);
$app->run(new ArgvInput(['index.php', 'orm:schema-tool:update', '-f', '--dump-sql']));
} catch (\Throwable $e) {
if (\class_exists(Debugger::class) === true) {
Debugger::log($e, 'critical');
}
Helpers::terminalRenderError($e->getMessage());
Helpers::terminalRenderCode($e->getFile(), $e->getLine());

Expand Down

0 comments on commit 997dd31

Please sign in to comment.