Write to the error log if displayErrorDetails is false

@param  \Exception|\Throwable $throwable The caught Throwable object.
@return void
509331
protected function writeToErrorLog($throwable)
    {
        if ($this->displayErrorDetails()) {
            return;
        }

        $prev = $this->translator()->translate('Previous error:', [], 'charcoal');
        $note = $this->translator()->translate(
            'View in rendered output by enabling the "displayErrorDetails" setting.',
            [],
            'charcoal'
        );

        $message = $this->renderThrowableAsText($throwable);
        while ($throwable = $throwable->getPrevious()) {
            $message .= PHP_EOL.$prev.PHP_EOL;
            $message .= $this->renderThrowableAsText($throwable);
        }

        $message .= PHP_EOL.$note.PHP_EOL;

        $this->logError($message);
    }
1099496
public function handleException($exception)
    {
        if ($exception instanceof ExitException) {
            return;
        }

        $this->exception = $exception;

        // disable error capturing to avoid recursive errors while handling exceptions
        $this->unregister();

        // set preventive HTTP status code to 500 in case error handling somehow fails and headers are sent
        // HTTP exceptions will override this value in renderException()
        if (PHP_SAPI !== 'cli') {
            http_response_code(500);
        }

        try {
            $this->logException($exception);
            if ($this->discardExistingOutput) {
                $this->clearOutput();
            }
            $this->renderException($exception);
            if (!Zilf_ENV_TEST) {
                \Zilf::getLogger()->flush(true);
                if (defined('HHVM_VERSION')) {
                    flush();
                }
                exit(1);
            }
        } catch (\Exception $e) {
            // an other exception could be thrown while displaying the exception
            $this->handleFallbackExceptionMessage($e, $exception);
        } catch (\Throwable $e) {
            // additional check for \Throwable introduced in PHP 7
            $this->handleFallbackExceptionMessage($e, $exception);
        }

        $this->exception = null;
    }
1303023
public function renderException($exception)
	{
		if (!$this->getOption('v', 0))
		{
			$this->out('')->out($exception->getMessage());

			return;
		}

		parent::renderException($exception);
	}
104267
public function fail(\Throwable $throwable)
    {
        Logger::get()->exception($throwable);
        header('Server error', true, 500);
        echo '<h1>Eix</h1>';
        echo 'The application cannot continue.';
        echo '<blockquote>' . $throwable->getMessage() . '</blockquote>';

        if (defined('DEBUG') && DEBUG) {
            echo '<pre>' . $throwable->getTraceAsString() . '</pre>';
        }

        die(-1);
    }
931581
public function handler(Throwable $exception): void
	{
		try
		{
			// Empty output buffers

			$this->clearOutputBuffers();

			// Loop through the exception handlers

			foreach($this->handlers as $handler)
			{
				if($exception instanceof $handler['exceptionType'])
				{
					if($this->handleException($handler['handler'], $exception) !== null)
					{
						break;
					}
				}
			}

			// Log exception

			if($this->shouldExceptionBeLogged($exception))
			{
				$this->getLogger()->error($exception->getMessage(), ['exception' => $exception]);
			}
		}
		catch(Throwable $e)
		{
			// Empty output buffers

			$this->clearOutputBuffers();

			// One of the exception handlers failed so we'll just show the user a generic error screen

			echo $e->getMessage() . ' on line [ ' . $e->getLine() . ' ] in [ ' . $e->getFile() . ' ]' . PHP_EOL;
		}

		exit(1);
	}
890155
public function handleException( \Throwable $e ) : bool
    {
        // Render exception
        $output = $this->renderer->output( $e );
    
        // output
        fwrite(STDERR, $output . PHP_EOL);
    
        return true;
    }
26825
protected function renderException($output, \Throwable $e)
    {
        $this->laravel[ExceptionHandler::class]->renderForConsole($output, $e);
    }
368779
public function handleException( \Throwable $e ) : bool
    {
        if ( $e instanceof HttpStatusException )
        {
            // Show HTTP error document
            $html = $this->provider->getErrorDocument( $e->getStatusCode() );
            
            // output html
            echo $html;

            return true;
        }

        return false;
    }
741447
public function handleException( \Throwable $e ) : bool
    {
        // Render exception
        $output = $this->renderer->output( $e );
        
        // output
        $this->logger->error($output, [
            'exception' => $e,
        ]);
    
        return true;
    }
1371386
protected function shouldExceptionBeLogged(Throwable $exception): bool
	{
		if($this->logger === null)
		{
			return false;
		}

		foreach($this->disableLoggingFor as $exceptionType)
		{
			if($exception instanceof $exceptionType)
			{
				return false;
			}
		}

		return true;
	}
862838
protected function handleViewException( Throwable $e )
	{
		$e = new ErrorException( $this->getMessage( $e ), 0, 1, $e->getFile(), $e->getLine(), $e );

		parent::handleViewException( $e );
	}
164531
public function error($message, $throwable = null) {
		$this->log(\n2n\log4php\LoggerLevel::getLevelError(), $message, $throwable);
	}
47147
private function shouldBeLogged(Throwable $throwable): bool
    {
        $result = array_key_exists(get_class($throwable), $this->doNotLogClassesAsKeys) === false;

        return $result;
    }
1310046
public function fail(\Throwable $exception)
    {
        if (null === $this->observable) {
            return;
        }

        $this->observable = null;
        $this->failed = true;
        $this->delayed->reject($exception);
    }
1039036
private function logException(Throwable $exception, ContainerInterface $container, string $message): void
    {
        if ($container->has(LoggerInterface::class) === true) {
            /** @var LoggerInterface $logger */
            $logger = $container->get(LoggerInterface::class);

            // The sad truth is that when you have a problem logging might not be available (e.g. no permissions
            // to write on a disk). We can't do much with it and can only hope that the error information will be
            // delivered to the user other way.
            try {
                $logger->critical($message, ['exception' => $exception]);
            } catch (Exception $secondException) {
            }
        }
    }
627836
public function handleException($exception)
    {
        // Ignore if the error is suppressed by using the shut-up operator @
        if (error_reporting() === 0) {
            return;
        }

        $this->renderingOptions = $this->resolveCustomRenderingOptions($exception);

        if ($this->throwableStorage instanceof ThrowableStorageInterface && isset($this->renderingOptions['logException']) && $this->renderingOptions['logException']) {
            $message = $this->throwableStorage->logThrowable($exception);
            $this->logger->critical($message);
        }

        switch (PHP_SAPI) {
            case 'cli':
                $this->echoExceptionCli($exception);
                break;
            default:
                $this->echoExceptionWeb($exception);
        }
    }
108656
public function log(\Throwable $throwable)
    {
        $logData  = date('Y-m-d H:i:s');
        $logData .= $this->fieldsOf($throwable);
        $logData .= $this->fieldsOf($throwable->getPrevious());
        error_log(
                $logData . "\n",
                3,
                $this->logDir() . DIRECTORY_SEPARATOR . 'exceptions-' . date('Y-m-d') . '.log'
        );
    }