diff options
Diffstat (limited to 'core/Console.php')
-rw-r--r-- | core/Console.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/Console.php b/core/Console.php index 70cec3c740..1bf61c0fd2 100644 --- a/core/Console.php +++ b/core/Console.php @@ -78,6 +78,21 @@ class Console extends Application public function doRun(InputInterface $input, OutputInterface $output) { + try { + return $this->doRunImpl($input, $output); + } catch (\Exception $ex) { + try { + FrontController::generateSafeModeOutputFromException($ex); + } catch (\Exception $ex) { + // ignore, we re-throw the original exception, not a wrapped one + } + + throw $ex; + } + } + + private function doRunImpl(InputInterface $input, OutputInterface $output) + { if ($input->hasParameterOption('--xhprof')) { Profiler::setupProfilerXHProf(true, true); } |