Example #1
0
 /**
  * Handle exceptions during rendering process
  *
  * @param \Exception $cause
  * @throws \Exception
  * @return void
  */
 protected function handleRenderException(\Exception $cause)
 {
     if ($this->appState->getMode() === State::MODE_DEVELOPER) {
         throw $cause;
     }
     $message = $cause instanceof LocalizedException ? $cause->getLogMessage() : $cause->getMessage();
     $this->logger->critical($message);
 }