Determine if the exception is in the "do not report" list.

@param  \Exception  $e
@return bool
432513
protected function shouldntReport(Exception $e)
    {
        $dontReport = array_merge($this->dontReport, $this->internalDontReport);

        return ! is_null(Arr::first($dontReport, function ($type) use ($e) {
            return $e instanceof $type;
        }));
    }
485445
public function exception($e)
    {
        $logLevel = \Psr\Log\LogLevel::CRITICAL;
        if ($e instanceof \Sabre\DAV\Exception) {
            // If it's a standard sabre/dav exception, it means we have a http
            // status code available.
            $code = $e->getHTTPCode();

            if ($code >= 400 && $code < 500) {
                // user error
                $logLevel = \Psr\Log\LogLevel::INFO;
            } else {
                // Server-side error. We mark it's as an error, but it's not
                // critical.
                $logLevel = \Psr\Log\LogLevel::ERROR;
            }
        }

        $this->server->getLogger()->log(
            $logLevel,
            'Uncaught exception',
            [
                'exception' => $e,
            ]
        );
    }
1109094
protected function isInList($list, Exception $exception)
    {
        // check if we actually have a list and its an array
        if ($list && is_array($list)) {
            // if we do lets loop through and check if our exception matches any of the classes
            foreach ($list as $type) {
                if ($exception instanceof $type) {
                    // if we match return true
                    return true;
                }
            }
        }

        // we got to the end there must be no match
        return false;
    }
292029
protected function editActionException(\Exception $e)
    {
        $this->handleException($e);
        $id = $this->get('request')->get($this->admin->getIdParameter());
        $object = $this->admin->getObject($id);

        return $this->redirectTo($object);
    }
1300992
public function logDebugException(\Exception $e)
    {
        if ($this->getServerContext()->hasLogger(LoggerUtils::SYSTEM)) {
            $this->getServerContext()->getLogger(LoggerUtils::SYSTEM)->debug($e->__toString());
        }
    }
308183
public function exceptionHandler($e) {
		static::$reservedMemory = null;

		$this->logException($e);

		if(!headers_sent())
			http_response_code(500);

		if($this->display) {
			if($this->debug) {
				$trace = $this->getBacktraceFromException($e);

				if($e instanceof PSRException)
					$msg = $e->getMessage();
				elseif($e instanceof \ErrorException)
					$msg = 'PHP ('.static::getPHPError($e->getCode()).'): '.$e->getMessage();
				else
					$msg = get_class($e).': '.$e->getMessage();

				$result = '';
				if($msg)
					$result .= $msg."\n\n";
				$result .= Debug::getReport($trace);
				echo $result;
			}
			else
				echo 'Something went wrong.';
		}
	}
417808
protected function dumpException(\Exception $e)
    {
        Logger::log('Starting dump exception');
        $ex = (NULL !== $e->getPrevious()) ? $e->getPrevious() : $e;
        $error = array(
            "error" => $ex->getMessage(),
            "file" => $ex->getFile(),
            "line" => $ex->getLine(),
        );
        Logger::log('Throwing exception', LOG_ERR, $error);
        unset($error);

        return $this->router->httpNotFound($ex);
    }
1205406
protected function isBreak($e)
    {
        if (!$this->config['break_reconnect']) {
            return false;
        }

        $info = [
            'server has gone away',
            'no connection to the server',
            'Lost connection',
            'is dead or not enabled',
            'Error while sending',
            'decryption failed or bad record mac',
            'server closed the connection unexpectedly',
            'SSL connection has been closed unexpectedly',
            'Error writing data to the connection',
            'Resource deadlock avoided',
        ];

        $error = $e->getMessage();

        foreach ($info as $msg) {
            if (false !== stripos($error, $msg)) {
                return true;
            }
        }
        return false;
    }
596032
public function getMessageViaDefault(Exception $e)
    {
        $msg = get_class($e)." was thrown! \n".$e->getMessage();
        if ($this->config['includeExceptionStackTrace'] === true) {
            $msg .= "\n\n".$e->getTraceAsString();
        }
        return $msg;
    }
201639
protected function isExceptionRecoverable($e)
	{
		if ($e instanceof \ErrorException)
		{
			$ignore = E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_STRICT;
			return (($ignore & $e->getSeverity()) != 0);
		}

		return false;
	}
817806
public function report(Exception $e)
    {
        try {
            $this->manager->trackException($e);
        }
        catch (Exception $exception) {
            // ignore
        }

        $this->illuminateHandler->report($e);
    }
488304
public function report(Exception $e)
    {
        logger()->error('PHP Error', [
            'file'    => $e->getFile(),
            'line'    => $e->getLine(),
            'message' => $e->getMessage()
        ]);
    }
90212
public function handleException($e)
    {
        if (!isset($this->route)) {
            return false;
        }
        return $this->route->handleException($e);
    }
877048
protected function handleException($e)
    {
        if (isset($this->exceptions)) {
            $this->exceptions->report($e);
        }

        if ($this->causedByLostConnection($e)) {
            $this->shouldQuit = true;
        }
    }
225836
public function formatException(\Exception $e) {
        $entry = array();

        $entry['class'] = get_class($e);
        $entry['message'] = $e->getMessage();
        $entry['file'] = $e->getFile();
        $entry['line'] = $e->getLine();
        $entry['trace'] = $e->getTraceAsString();

        return $entry;
    }
429358
public function logException(\Exception $e)
    {
        $error = $e->getMessage() . $e->getTraceAsString();
        return $this->logEmergency($error);
    }
573273
public function canReport(Throwable $e): bool
    {
        $level = $this->getLogLevel($e);

        // TODO : utiliser la méthode shouldLog():bool
        return $this->logLevels[$level] <= $this->logLevels[$this->logLevelThreshold];
    }