Get the exception array.

@return array
553335
protected function exceptionArray()
    {
        $exceptionArray = [$this->exceptionObject()];
        $previous = $this->previous;
        while ($previous) {
            $exceptionArray[] = $previous->exceptionObject();
            $previous = $previous->previous;
        }

        return $this->cleanupObj($exceptionArray, false);
    }
113345
public function getArray()
    {
        $config = @include $this->location;
        if (!is_array($config)) {
            throw new \Exception('Config not found');
        }

        $this->config = $config;

        return $config;
    }
581005
public function allErrorArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allError());
        }
        return $r;
    }
889549
public function toArray()
    {
        $packet = $this->getPacket();

        return array(
            'id'        => (string)$this->id,
            'queue'     => (string)$this->queue,
            'class'     => (string)$this->class,
            'data'      => $this->data,
            'worker'    => (string)$packet['worker'],
            'status'    => (int)$packet['status'],
            'created'   => (float)$packet['created'],
            'updated'   => (float)$packet['updated'],
            'delayed'   => (float)$packet['delayed'],
            'started'   => (float)$packet['started'],
            'finished'  => (float)$packet['finished'],
            'output'    => $packet['output'],
            'exception' => $packet['exception']
        );
    }
226079
public function toArray()
	{
		$this->data = $this->transformer->transformBack($this->data);

		return $this->data;
	}
416644
public function getReceptionCodes()
    {
        $rcLib = $this->util->getReceptionCodeLibrary();

        if ($this->unDelete) {
            return $rcLib->getTrackRestoreCodes();
        }

        return $rcLib->getTrackDeletionCodes();
    }
694317
public function toArray(): array
    {
        return array_filter([
            'name' => $this->name,
            'counters' => array_values(array_map(function (Counter $counter) {
                return $counter->toArray();
            }, $this->counters)),
            'application_type' => Filter::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'total_elements' => 0 === $this->totalElements
                ? null
                : $this->totalElements,
            'active_elements' => array_values(array_map(function ($counter) {
                return ($counter instanceof Counter)
                    ? $counter->toArray()
                    : $counter;
            }, $this->activeElements)),
            'highest_active_level' => 0 === $this->highestActiveLevel
                ? null
                : $this->highestActiveLevel,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
941213
public function toArray() {

        return [
            'uid' => $this->uid,
            'method' => $this->method,
            'parameters' => $this->parameters,
            'special_types' => $this->special_types,
            'id' => $this->id
        ];

    }
57378
public function getTokens(): array
    {
        $response = $this
            ->httpClient
            ->get(
                sprintf(
                    '/%s/tokens',
                    $this->getAppUUID()->getId()
                ),
                'get',
                [],
                [],
                Http::getApisearchHeaders($this)
            );

        self::throwTransportableExceptionIfNeeded($response);

        return array_map(function (array $token) {
            return Token::createFromArray($token);
        }, $response['body']);
    }
68779
public function toArray() : array
    {
        $result = [];

        if (!empty($this->id)) {
            $result['id'] = $this->id;
        }

        if (!empty($this->link)) {
            $result['links']['about'] = $this->link;
        }

        if (!empty($this->status)) {
            $result['status'] = "{$this->status}";
        }

        if (!empty($this->code)) {
            $result['code'] = "{$this->code}";
        }

        if (!empty($this->title)) {
            $result['title'] = $this->title;
        }

        if (!empty($this->detail)) {
            $result['detail'] = $this->detail;
        }

        if (!empty($this->source)) {
            $result['source'] = $this->source->map(function ($item) {
                return $item;
            });
        }

        if (!empty($this->meta)) {
            $result['meta'] = $this->meta;
        }

        if (!empty($this->exception)) {
            $e = $this->exception;
            if ($e instanceof ExtendedLoggingInformation) {
                $result['exception'] = $e->context();
            } else {
                $result['exception'] = [
                    'exception' => get_class($e),
                    'message' => $e->getMessage(),
                    'stacktrace' => $e->getTrace(),
                ];
            }
        }

        return $result;
    }
1106790
public function getArray()
    {
        $options = [];

        if ($this->isDisabled() || $this->canHaveValue() && empty($this->values)) {
            return $options;
        }

        foreach ($this->values as $value) {
            $options[] = $this->flag();
            $options[] = $value;
        }

        if (empty($options)) {
            $options[] = $this->flag();
        }

        return $options;
    }
1362045
public function toArray()
    {
        return [
            'folderId' => $this->folder->getId(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
1114422
public function toArray(): array
    {
        $data = ReflectionUtil::objToSnakeArray($this, static::blacklist());
        foreach ($this->renamed as $name => $newName) {
            if (!array_key_exists($name, $data)) {
                continue;
            }
            $data[$newName] = $data[$name];
            unset($data[$name]);
        }

        return $data;
    }
825782
protected function getErrors()
    {
        $arr = ['error' => $this->getMessage()];

        if (count($this->attrs) > 0) {
            $arr['attrs'] = $this->getAttrs();
        }

        if (count($this->attrsCustom) > 0) {
            $arr['attrscustom'] = $this->getAttrsCustom();
        }

        return $arr;
    }
1260036
public function getErrorMessages() {
        $messages = array();
        
        foreach($this->entries as $entry) {
            if($entry->isError()) {
                $messages[] = $entry->getMessage();
            }
        }
        
        return $messages;
    }
80537
protected function _getErrorData()
    {
        $data = [];

        $viewVars = $this->controller->viewVars;
        if (!empty($viewVars['_serialize'])) {
            foreach ($viewVars['_serialize'] as $v) {
                $data[$v] = $viewVars[$v];
            }
        }

        if (!empty($viewVars['error']) && Configure::read('debug')) {
            $data['exception'] = [
                'class' => get_class($viewVars['error']),
                'code' => $viewVars['error']->getCode(),
                'message' => $viewVars['error']->getMessage(),
            ];

            if (!isset($data['trace'])) {
                $data['trace'] = Debugger::formatTrace($viewVars['error']->getTrace(), [
                    'format' => 'array',
                    'args' => false
                ]);
            }
        }

        return $data;
    }
752134
protected function errorsToArray(): array
    {
        $errors = [];

        foreach ($this->errors as $error)
        {
            $errors[] = $error->toArray();
        }

        return $errors;
    }