Build an HTML-formatted string describing the errors.

@return string
15368
public function getString()
    {
        $html = '';
        if ($this->error->has()) {
            $html .= '<ul class="ccm-error">';
            foreach ($this->error->getList() as $error) {
                $html .= '<li>';
                if ($error instanceof HtmlAwareErrorInterface && $error->messageContainsHtml()) {
                    $html .= (string) $error;
                } else {
                    $html .= nl2br(h((string) $error));
                }
                $html .= '</li>';
            }
            $html .= '</ul>';
        }

        return $html;
    }
954248
public function __toHtml()
    {
        try {
            $str = '';
            foreach ($this->getData() as $type=>$statements) {
                foreach ($statements as $statement) {
                    $str .= $statement->__toHtml();
                }
            }
        } catch (\Exception $e) {
            $str = $e->getMessage();
        }
        return $str;
    }
985921
public function getText()
    {
        $lines = [];
        if ($this->error->has()) {
            foreach ($this->error->getList() as $error) {
                if ($error instanceof HtmlAwareErrorInterface && $error->messageContainsHtml()) {
                    $lines[] = strip_tags((string) $error);
                } else {
                    $lines[] = (string) $error;
                }
            }
        }

        return implode("\n", $lines);
    }
698863
public function normalise($htmlErrorString)
    {
        $result = new Result();
        $result->setRawError(trim($htmlErrorString));

        if (($normalisedError = $this->processSpecialCase($htmlErrorString)) !== false) {
            $result->setNormalisedError($normalisedError);
            return $result;
        }

        $patternBasedNormaliser = new PatternBasedNormaliser();
        if (($normalisedError = $patternBasedNormaliser->normalise($htmlErrorString)) !== null) {
            $result->setNormalisedError($normalisedError);
            return $result;
        }

        if (($normalisedError = $this->getQuotedParameterNormalisedError($htmlErrorString)) !== null) {
            $result->setNormalisedError($normalisedError);
            return $result;
        }

        return $result;
    }
1099730
public function __tostring() {
        // Prepare field label
        if (!$this->label)
            $this->label = $this->name;
        // Prepare errors
        $errors = [];
        foreach ((array) $this->errors as $error) {
            // Get Html code by $error
            $errors[] = $this->renderError($error);
        }
        // Implode errors
        $this->errors = implode('', $errors);
        // Prepare the object for rendering
        $this->prepare();
        // Make html code related to the attributes
        $this->attributes = static::array2attrs($this->attributes);
        // Return rendered field
        return $this->renderField();
    }
966178
public function getFirstError(): string
    {
        $result = '';
        $errors = $this->getErrors();
        $firstField = reset($errors);

        if ($firstField && isset($firstField[0])) {
            $result = $firstField[0];
        }

        return $result;
    }
1059009
public function errorInfo(): string
    {
        $errorInfo = $this->statement->errorInfo();
        return !isset($errorInfo[0]) || 0 == $errorInfo[0] ? '' : implode(' ', $errorInfo);
    }
88135
public function get_debug_string() {
		return 'status: '.$this->statuscode.' body:'.htmlentities($this->body).' errors: '.print_r($this->errors, true);
	}
86457
private function errorMessage()
    {


        if ($this->preparedExec == false){
    		$info = $this->dbConnector->errorInfo();
    	}
    	else{
    		$info = $this->lastPreparedExecStatement->errorInfo();
    	}
    	
    	if (!empty($info[2])){
    		$returnValue = $info[2];
    	}
    	else if (!empty($info[1])){
            $returnValue = 'Driver error: ' . $info[1];
    	}
    	else if (!empty($info[0])){
    		$returnValue = 'SQLSTATE: ' . $info[0];
    	}
        else{
            $returnValue = 'No error message to display.';
        }

        return (string) $returnValue;
    }
1336563
function ErrorMsg()
	{
		if (!$this->_connectionID) return "No connection established";
		$errmsg = '';

		try {
			$errc = $this->_connectionID->Errors;
			if (!$errc) return "No Errors object found";
			if ($errc->Count == 0) return '';
			$err = $errc->Item($errc->Count-1);
			$errmsg = $err->Description;
		}catch(exception $e) {
		}
		return $errmsg;
	}
708717
public function getErrorConstant(): string
	{
		static $constants = [
			UPLOAD_ERR_OK         => 'UPLOAD_ERR_OK',
			UPLOAD_ERR_INI_SIZE   => 'UPLOAD_ERR_INI_SIZE',
			UPLOAD_ERR_FORM_SIZE  => 'UPLOAD_ERR_FORM_SIZE',
			UPLOAD_ERR_PARTIAL    => 'UPLOAD_ERR_PARTIAL',
			UPLOAD_ERR_NO_FILE    => 'UPLOAD_ERR_NO_FILE',
			UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR',
			UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE',
			UPLOAD_ERR_EXTENSION  => 'UPLOAD_ERR_EXTENSION',
		];
		
		return $constants[$this->statusCode];
	}
558054
public function getFirstError()
    {
        if (empty($this->errorMessages)) {
            return '';
        }

        reset($this->errorMessages);
        return current(current($this->errorMessages));
    }
757899
public function toArray()
    {
        $errorInfo['code'] = $this->getCode();
        $errorInfo['context'] = $this->getContext();
        $errorInfo['message'] = htmlentities($this->getMessage());

        if (config('app.debug', false)) {
            $trace = $this->getTraceAsString();
            $trace = str_replace(["\n", "#"], ["", "<br>"], $trace);
            $traceArray = explode("<br>", $trace);
            $cleanTrace = [];
            foreach ($traceArray as $k => $v) {
                if (!empty($v)) {
                    $cleanTrace[] = $v;
                }
            }
            $errorInfo['trace'] = $cleanTrace;
        }

        return $errorInfo;
    }
227738
public function build_string() {

		$string = '';

		$breadcrumbs = $this->build_array();

		// Output breadcrumbs
		if ( ! empty( $breadcrumbs ) ) {

			// Additional classes?
			$classes = $this->options['classes'] ? ' ' . $this->options['classes'] : '';

			// Output
			$i = 0;
			$count = count( $breadcrumbs );
			$string .= '<div class="ctc-breadcrumbs' . $classes . '">';
			foreach ( $breadcrumbs as $breadcrumb ) {

				$i++;

				$breadcrumb = (array) $breadcrumb;

				if ( ! empty( $breadcrumb[0] ) ) {

					$text = $breadcrumb[0];

					// Separator
					if ( $i > 1 ) {
						$string .= $this->options['separator'];
					}

					// If no link given (just in case)
					if ( empty( $breadcrumb[1] ) ) { // add  || $i == $count if don't wany any last item linked, but it's more helpful and reable with it linked
						$string .= '<span>' . esc_html( $text ) . '</span>';
					}

					// Linked
					else {
						$string .= '<a href="' . esc_url( $breadcrumb[1] ) . '">' . esc_html( $text ) . '</a>';
					}

				}

			}
			$string .= '</div>';

		}

		// Restore original $post data for proper code execution after breadcrumbs
		wp_reset_postdata();

		return apply_filters( 'ctc_breadcrumbs_string', $string );

	}
803341
function formatWebErrors(errors) {
    let errs = {};
    if (errors && errors.constructor == Array) {
        errors.forEach(function(item) {
            if (!errs[item.param]) errs[item.param] = [];
            errs[item.param].push(item.msg);
        });
    }
    return errs;
}
309237
public function renderHtmlErrorDetails()
    {
        $error = $this->getThrown();

        $html = $this->renderHtmlError($error);
        while ($error = $error->getPrevious()) {
            $html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
            $html .= $this->renderHtmlError($error);
        }

        return $html;
    }
640268
protected function buildMessage()
    {
        if (empty($this->plainMessage) && empty($this->htmlMessage)) {
            return '';
        }
        if (!empty($this->plainMessage) && empty($this->htmlMessage)) {
            return $this->plainMessage;
        }
        if (empty($this->plainMessage) && !empty($this->htmlMessage)) {
            return $this->htmlMessage;
        }

        $message = array();
        array_push($message, "--{$this->boundaryAlternative}");
        $message = array_merge($message, $this->buildPlainMessageHeader());
        array_push($message, $this->plainMessage);
        array_push($message, "--{$this->boundaryAlternative}");
        $message = array_merge($message, $this->buildHtmlMessageHeader());
        array_push($message, $this->htmlMessage);
        array_push($message, "--{$this->boundaryAlternative}--");

        return implode(self::LINE_BREAK, $message);
    }