/** * @param \Exception|\Throwable $exception * @param \Spryker\Shared\EventJournal\Model\EventJournalInterface $eventJournal * @param \Spryker\Shared\NewRelic\ApiInterface $newRelicApi * * @return void */ protected static function sendExceptionToFile($exception, EventJournalInterface $eventJournal, ApiInterface $newRelicApi) { try { $message = ErrorRenderer::renderException($exception); Log::log($message, 'exception.log'); } catch (\Exception $internalException) { self::sendExceptionToEventJournal($internalException, $eventJournal, $newRelicApi, true); self::sendExceptionToNewRelic($internalException, $eventJournal, $newRelicApi, true); } }
/** * @param \Exception|\Throwable $exception * @param bool $output * * @return void */ protected function echoOutput($exception, $output) { if ($output) { $message = ErrorRenderer::renderException($exception); echo $message; } }