public function getMessage(string $delimiter = ' '): string
    {
        $messages = $this->getMessages();
        $return = [];

        foreach ($messages as $part) {
            if (is_array($part)) {

                $type = $part['type'] ?? '';
                if (!in_array($type, [self::TYPE_PHP])) {
                    $return[] = print_r($part, true);
                } else {
                    $return[] = "PHP [{$part['number']}] {$part['message']} in file {$part['file']}:{$part['line']}";
                }

            } else if (is_object($part) && $part instanceof Throwable) {
                $isCli = defined('KOLDY_CLI') && KOLDY_CLI === true;

                if ($isCli) {
                    $on = '';
                } else {
                    $on = ' on ' . Application::getCurrentURL();
                }

                $className = get_class($part);
                $return[] = "[{$className}] {$part->getMessage()}{$on} in {$part->getFile()}:{$part->getLine()}\n\n{$part->getTraceAsString()}";

            } else if (is_object($part) && method_exists($part, '__toString')) {
                $return[] = $part->__toString();

            } else if (is_object($part)) {
                $return[] = print_r($part, true);

            } else {
                $return[] = $part;

            }
        }

        return implode($delimiter, $return);
    }