Get all the exceptions added to the shared memory.

@return \Throwable[]
170660
public function getExceptions(): array
    {
        $memory = $this->getMemory();

        $exceptions = $this->unserialize($memory);

        shmop_write($memory, serialize([]), 0);

        shmop_close($memory);

        return $exceptions;
    }
360017
public function getItemsWithUnhandledErrors()
    {
        $list = [];
        foreach ($this->getItems() as $item) {
            if ($item->hasUnhandledError()) {
                $list[] = $item;
            }
        }

        return $list;
    }
406718
protected function _getErrors()
    {
        $aErrors = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('Errors');

        if (null === $aErrors) {
            $aErrors = [];
        }

        return $aErrors;
    }
821959
public function all()
    {
        if ($this->exception !== null) {
            throw $this->exception;
        }

        return $this->fetch(true, $this->fetchAssoc);
    }
1225734
private function __index(): array {
        $this->indexedRes  = array();
        $this->commitedRes = array();

        if (count($this->paths) === 0) {
            throw new RuntimeException('No paths set');
        }

        try {
            foreach ($this->paths as $path) {
                foreach (new DirectoryIterator(self::containerDir() . $path) as $i) {
                    $this->indexEntry($i);
                }
            }
        } catch (\Throwable $e) {
            if ($e instanceof IndexerException) {
                $this->commitedRes = array_merge($this->commitedRes, $e->getCommitedResources());
            }
            throw new IndexerException($e->getMessage(), $e->getCode(), $e, $this->commitedRes);
        }

        return array($this->indexedRes, $this->commitedRes);
    }
1200435
protected function getExceptionLinesFromLogFile()
    {
        $exceptionLogLines = file($this->exceptionLogFile, FILE_IGNORE_NEW_LINES);
        if (false === $exceptionLogLines) {
            throw new \OxidEsales\Eshop\Core\Exception\StandardException('File ' . $this->exceptionLogFile . ' could not be read');
        }

        $exceptionEntries = array_filter(
            $exceptionLogLines,
            function ($entry) {
                return false !== strpos($entry, '.ERROR') && false !== strpos($entry, 'Exception');
            }
        );

        return $exceptionEntries;
    }
969761
public List<ExceptionMonitor> getExceptionMonitors()
    {
        synchronized( this )
        {
            ArrayList<ExceptionMonitor> result = new ArrayList<ExceptionMonitor>();
            result.add( m_exceptionMonitor );
            return result;
        }
    }
7212
protected function getStacktrace(\Throwable $e): array
    {
        $stacktrace = $e->getTrace();
        if (empty($stacktrace)) {
            return [];
        }

        //Let's let's clarify exception location
        $header = [
                'file' => $e->getFile(),
                'line' => $e->getLine()
            ] + $stacktrace[0];

        if ($stacktrace[0] != $header) {
            array_unshift($stacktrace, $header);
        }

        return $stacktrace;
    }
696291
public function getExceptions(\Throwable $exception): array
    {
        $exc = $exception;
        do {
            $exc_data = [
                'value' => $this->serializer->serialize($exc->getMessage()),
                'type' => get_class($exc),
            ];

            /**'exception'
             * Exception::getTrace doesn't store the point at where the exception
             * was thrown, so we have to stuff it in ourselves. Ugh.
             */
            $trace = $exc->getTrace();
            $frame_where_exception_thrown = [
                'file' => $exc->getFile(),
                'line' => $exc->getLine(),
            ];

            array_unshift($trace, $frame_where_exception_thrown);

            $exc_data['stacktrace'] = [
                'frames' => $this->getStackTraceFrames($trace),
            ];

            $exceptions[] = $exc_data;
        } while ($exc = $exc->getPrevious());

        return array_reverse($exceptions);
    }
608359
@Expose
    protected List<Exception> getExceptions() {
        List<Exception> exceptions = new ArrayList<Exception>();
        exceptions.add(exception);

        Throwable currentThrowable = exception.getThrowable().getCause();
        while (currentThrowable != null) {
            exceptions.add(new Exception(config, currentThrowable));
            currentThrowable = currentThrowable.getCause();
        }

        return exceptions;
    }
382432
public function exceptions()
    {
        return [
            400 => [
                'message' => 'The request cannot be fulfilled due to bad syntax.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\BadRequestException; }
            ],
            401 => [
                'message' => 'Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\UnauthorizedException; }
            ],
            403 => [
                'message' => 'The request was a valid request, but the server is refusing to respond to it.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\ForbiddenException; }
            ],
            404 => [
                'message' => 'The requested resource could not be found but may be available again in the future.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\NotFoundException; }
            ],
            405 => [
                'message' => 'A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\MethodNotAllowedException; }
            ],
            406 => [
                'message' => 'The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\NotAcceptableException; }
            ],
            409 => [
                'message' => 'Indicates that the request could not be processed because of conflict in the request, such as an edit conflict in the case of multiple updates.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\ConflictException; }
            ],
            410 => [
                'message' => 'Indicates that the resource requested is no longer available and will not be available again.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\GoneException; }
            ],
            411 => [
                'message' => 'The request did not specify the length of its content, which is required by the requested resource.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\LengthRequiredException; }
            ],
            412 => [
                'message' => 'The server does not meet one of the preconditions that the requester put on the request.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\PreconditionFailedException; }
            ],
            415 => [
                'message' => 'The request entity has a media type which the server or resource does not support.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\UnsupportedMediaException; }
            ],
            417 => [
                'message' => 'The server cannot meet the requirements of the Expect request-header field.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\ExpectationFailedException; }
            ],
            428 => [
                'message' => 'The origin server requires the request to be conditional.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\PreconditionRequiredException; }
            ],
            429 => [
                'message' => 'The user has sent too many requests in a given amount of time.',
                'throw'   => function(){ throw new \League\Route\Http\Exception\TooManyRequestsException; }
            ],
            451 => [
                'message' => 'The resource is unavailable for legal reasons..',
                'throw'   => function(){ throw new \League\Route\Http\Exception\UnavailableForLegalReasonsException; }
            ]
        ];
    }
246567
public function getSuccessful()
    {
        $results = [];
        foreach ($this->hash as $key) {
            if (!($this->hash[$key] instanceof \Exception)) {
                $results[] = $this->hash[$key];
            }
        }

        return $results;
    }
1194271
public function deleteAll()
    {
        $response = [
            'success' => true,
            'deleted' => []
        ];
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        // Csrf token validation
        $this->validateCsrf();

        $ids = [];

        foreach ($this->getRequestParameter('ids') as $id) {
            $ids[] = $id['id'];
        }

        $this->signatureValidator->checkSignatures($this->getRequestParameter('ids'));

        $this->validateInstancesRoot($ids);

        foreach ($ids as $id) {
            $deleted = false;
            try {
                if ($this->hasWriteAccess($id)) {
                    $resource = new \core_kernel_classes_Resource($id);
                    if ($resource->isClass()) {
                        $deleted = $this->getClassService()->deleteClass(new \core_kernel_classes_Class($id));
                    } else {
                        $deleted = $this->getClassService()->deleteResource($resource);
                    }
                }
            } catch (\common_Exception $ce) {
                \common_Logger::w('Unable to remove resource ' . $id . ' : ' . $ce->getMessage());
            }
            if ($deleted) {
                $response['deleted'][] = $id;
            }
        }

        return $this->returnJson($response);
    }
913526
public function getErrors()
    {
        $arr_errors = [];

        if (! extension_loaded('gd') && ! extension_loaded('imagick')) {
            array_push($arr_errors, trans('laravel-filemanager::lfm.message-extension_not_found'));
        }

        if (! extension_loaded('exif')) {
            array_push($arr_errors, 'EXIF extension not found.');
        }

        if (! extension_loaded('fileinfo')) {
            array_push($arr_errors, 'Fileinfo extension not found.');
        }

        $mine_config_key = 'lfm.folder_categories.'
            . $this->helper->currentLfmType()
            . '.valid_mime';

        if (! is_array(config($mine_config_key))) {
            array_push($arr_errors, 'Config : ' . $mine_config_key . ' is not a valid array.');
        }

        return $arr_errors;
    }
418780
public function getErrors(): array
    {
        $error = [];

        foreach ($this->list as $r) {
            $error[$r->getPropertyPath()] = $r->getMessage();
        }

        return $error;
    }
714954
public function toArray(): array
    {
        $return = [];
        foreach ($this as $row) {
            if (is_array($row)) {
                $return[] = $row;
            } elseif (method_exists($row, 'toArray')) {
                $return[] = $row->toArray();
            } elseif (method_exists($row, 'getArrayCopy')) {
                $return[] = $row->getArrayCopy();
            } else {
                throw new Exception\RuntimeException(
                    __METHOD__ . ': Rows as part of this DataSource, with type ' . gettype($row) . ' cannot be cast to an array'
                );
            }
        }

        return $return;
    }
940803
public function getErrorList(): array
    {
        $errorList = $this->errorList;
        foreach ($this->fieldResultList as $fieldResult) {
            foreach ($fieldResult->getErrorList() as $error) {
                $errorList[] = $error;
            }
        }

        return $errorList;
    }