Write to the build log.
@param \Exception $exception
554604
protected function log(\Exception $exception)
    {
        if (null !== $this->logger) {
            $message = sprintf(
                '%s: %s (uncaught exception) at %s line %s',
                get_class($exception),
                $exception->getMessage(),
                $exception->getFile(),
                $exception->getLine()
            );

            $this->logger->error($message, array('exception' => $exception));
        }
    }
694831
public function logException(\Exception $ex,$prefix="ex")
    {
        $this->log($ex->getCode().":".$ex->getMessage()."\r\n".$ex->getTraceAsString(),get_class($ex),$prefix);
    }
960404
public function logCriticalException(\Exception $e)
    {
        if ($this->getServerContext()->hasLogger(LoggerUtils::SYSTEM)) {
            $this->getServerContext()->getLogger(LoggerUtils::SYSTEM)->critical($e->__toString());
        }
    }
259260
public static function writeException(\Exception $ex)
	{
		$response = array(
			'exception' => get_class($ex),
			'message' => $ex->getMessage(),
			'code' => $ex->getCode(),
		);
		static::writeJson($response);
	}
959828
function logexception(\Exception $exception) {
		try {
			$message = $exception->getMessage();
			$trace = $exception->getTraceAsString();
			$trace = $this->becloud($trace);
			$trace = str_replace("\n", "\n\t", trim($trace, " \n\r\t"));
			$this->log("$message\n\n\t$trace\n");
		}
		catch (\Exception $e) {
			$this->failedLogging($e, $exception->getMessage());
		}
	}
1260024
public function exceptionHandler(Exception $exception)
    {
        $this->logger->addError($exception->getMessage(), array($exception->getFile(), $exception->getLine()));
        exit(-1);
    }
807687
public function handleException(Exception $exception)
    {
        $this->_sendFatalError("Fatal proxy Exception: '"
                               . $exception->getMessage()
                               . "' in "
                               . $exception->getFile()
                               . ":"
                               . $exception->getLine());
    }
862240
public static function exception_log($exception){
		LogMaster::log("!!!Uncaught Exception\nCode: " . $exception->getCode() . "\nMessage: " . $exception->getMessage());
		if (LogMaster::$_output){
			echo "<pre><xmp>\n";
			echo LogMaster::get_session_log();
			echo "\n</xmp></pre>";
		}
		die();
	}
411259
protected function logException($request, $exception) {
		if ($this->is404($exception, $request)) {
			$level = LOG_ERR;
			Log::write($level, $this->getMessage($request, $exception), ['404']);
			return;
		}

		parent::logException($request, $exception);
	}
816918
private function logException(\Exception $e)
    {
        if (isset($this->logger)) {
            $this->logger->notice(
                $e->getMessage(), [
                                    'code' => $e->getCode(),
                                    'line' => $e->getLine(),
                                    'file' => $e->getFile(),
                                ]
            );
        } else {
            // @codeCoverageIgnoreStart
            error_log(sprintf('[%s] [%s:%d] %s', $e->getCode(), $e->getFile(), $e->getLine(), $e->getMessage()), E_NOTICE);
            // @codeCoverageIgnoreEnd
        }
    }
213421
protected function logException(\Exception $exception, $message)
    {
        if (null !== $this->logger) {
            if (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
                $this->logger->critical($message, array('exception' => $exception));
            } else {
                $this->logger->error($message, array('exception' => $exception));
            }
        }
    }
293889
protected function _addException(Exception $exception)
    {
        $this->_hasErrors = true;
        $this->_errorsList[$exception->getCode()] = [
            'message'   => $exception->getMessage(),
            'line'      => $exception->getLine(),
            'file'      => $exception->getFile(),
            'trace'     => $exception->getTraceAsString(),
        ];

        return $this;
    }
1201514
protected function handle($exception)
  {
    Output::error($exception);

    if ($this->isAjax()) {
      $this->toJson($exception);
      return;
    }

    $this->toHtml($exception);
  }
692034
static protected function formatExceptionMessage(\Exception $exception)
    {

        $errorFullText = '<div><b>New ' . get_class($exception) . '</b></div>';
        $errorFullText .= '<div><b>File:</b> ' . $exception->getFile() . '</div>';
        $errorFullText .= '<div><b>Line:</b> ' . $exception->getLine() . '</div>';
        $errorFullText .= '<div><b>Message:</b> ' . $exception->getMessage() . '</div>';

        $trace = $exception->getTrace();

        if (get_class($exception) != 'DebugException') {
            array_unshift($trace, array('file' => $exception->getFile(), 'line' => $exception->getLine(), 'function' => 'throw ' . get_class($exception), 'args' => array($exception->getMessage(), $exception->getCode())));
        }

        $traceString = '';
        foreach ($trace as $tTraceItem) {

            if (empty ($tTraceItem ['file'])) {
                $tTraceItem ['file'] = '';
            }
            if (empty ($tTraceItem ['line'])) {
                $tTraceItem ['line'] = '';
            }

            $traceString .= '<li>' . basename($tTraceItem ['file']) . " at line #" . $tTraceItem ['line'] . "\t";
            if (isset ($tTraceItem ['class'])) {
                $traceString .= $tTraceItem ['class'] . '::' . $tTraceItem ['function'] . '(';
            } elseif (isset ($tTraceItem ['function'])) {
                $traceString .= $tTraceItem ['function'] . '(';
            }

            if (!empty ($tTraceItem ['args'])) {
                $separator = '';
                foreach ($tTraceItem ['args'] as $arg) {
                    $traceString .= $separator . self::getArgument($arg);
                    $separator = ', ';
                }
                $traceString .= ')';
            }
            $traceString .= "</li>";
        }

        $errorFullText .= '<div><b>Backtrace:</b> <ul style="margin: 0.2em;">' . $traceString . '</ul></div>';

        return $errorFullText;
    }
628796
protected function logException( \Exception $e )
	{
		$logger = $this->context->getLogger();

		$logger->log( $e->getMessage(), \Aimeos\MW\Logger\Base::WARN, 'client/html' );
		$logger->log( $e->getTraceAsString(), \Aimeos\MW\Logger\Base::WARN, 'client/html' );
	}
1205450
public function dispatchException($exception) {
		if($this->isActive()) {
			if($this->dispatchPreviousExceptions && $exception->getPrevious()) {
				$this->dispatchException($exception->getPrevious());
			}
			$message = new ErrorMessage();
			$message->code = $exception->getCode();
			$message->class = get_class($exception);
			$message->data = $this->dumper->dump($exception->getMessage());
			$message->file = $exception->getFile();
			$message->line = $exception->getLine();
			$message->trace = self::fetchTrace($exception->getTrace(), $message->file, $message->line);
			$this->sendMessage($message);
		}
	}
1347437
public function report(Exception $exception)
    {
        $enableEmailExceptions = config('exceptions.emailExceptionEnabled');

        if ($enableEmailExceptions === '') {
            $enableEmailExceptions = config('exceptions.emailExceptionEnabledDefault');
        }

        if ($enableEmailExceptions) {
            if ($this->shouldReport($exception)) {
                $this->sendEmail($exception);
            }
        }

        parent::report($exception);
    }