Get the class to apply to HTML elements representing this error.
@return string
496369
public function getSeverityClass()
    {
        switch ($this->getSeverity()) {
            case self::SEVERITY_CRITICAL:
                return 'danger';

            case self::SEVERITY_HIGH:
                return 'warning';

            case self::SEVERITY_NORMAL:
                return 'info';

            case self::SEVERITY_LOW:
                return 'default';
        }
    }
183595
public function getErrorsAsString(): string
    {
        $errors = $this->getErrors();
        if (0 === $errors->count()) {
            return '';
        }
        $message = 'found ' . $errors->count() . ' errors validating '
                   . \get_class($this->dataObject);
        foreach ($errors as $error) {
            $message .= "\n\n" . $error->getPropertyPath() . ': ' . $error->getMessage();
        }

        return $message;
    }
57719
function toHtml(){

        // Add the class at the last minute.
        if ($this->get_force_ltr()) {
            if (!isset($this->_attributes['class'])) {
                $this->_attributes['class'] = 'text-ltr';
            } else {
                $this->_attributes['class'] .= ' text-ltr';
            }
        }

        if ($this->_hiddenLabel){
            $this->_generateId();
            return '<label class="accesshide" for="' . $this->getAttribute('id') . '" >' .
                    $this->getLabel() . '</label>' . parent::toHtml();
        } else {
            return parent::toHtml();
        }
    }
1258216
public function getErrorMessageFromHandle()
    {
        $errorMessage = null;

        if ($this->handle !== null) {
            $errorMessage = curl_errno($this->handle);
        }

        return $errorMessage === '' ? null : $errorMessage;
    }
717144
protected function getContainerCssClass()
	{
		$attribute = $this->attribute;
		return $this->model->hasErrors(CHtml::resolveName($this->model, $attribute)) ? CHtml::$errorCss : '';
	}
86528
public function renderClassAttribute() : string
    {
        if (!$this->classes) {
            return '';
        }

        $classString = array_map(function($item) {
            return helpers\e($item);
        }, $this->classes);

        return sprintf('class="%s"', implode(' ', $classString));
    }
1267873
public function getError()
    {
        $oOut       = new \stdClass();
        $oOut->msg  = $this->sErrorMsg;
        $oOut->code = $this->sErrorCode;
        $oOut->user = $this->sErrorUser;

        return $oOut;
    }
1143560
private function foundErrors()
    {
        $page = $this->getSession()->getPage();
        $element = $page->find('css', '.is-error');

        return $element != null;
    }
43272
private function getClass()
    {
        $parts = $this->explodeCallable($this->handler);

        if ($this->isStaticMethod()) {
            return $parts[0];
        }

        return get_class($parts[0]);
    }
552796
public function errorInfo(): string
    {
        if($this->lastStmt)
        {
            return $this->lastStmt->errorInfo();
        }
        else
        {
            $errorInfo = $this->instance->errorInfo();
            return !isset($errorInfo[0]) || 0 == $errorInfo[0] ? '' : implode(' ', $errorInfo);
        }
    }
1253371
protected function getElementClassString()
    {
        $elementClass = $this->getElementClass();

        if (Arr::isAssoc($elementClass)) {
            $classes = [];

            foreach ($elementClass as $index => $class) {
                $classes[$index] = is_array($class) ? implode(' ', $class) : $class;
            }

            return $classes;
        }

        return implode(' ', $elementClass);
    }
199264
public function getErrorDescription()
    {
        if ($this->error === UPLOAD_ERR_OK) {
            return null;
        }
        
        $descs = static::ERROR_DESCRIPTIONS;
        return isset($descs[$this->error]) ? $descs[$this->error] : $descs[-1];
    }
982
protected function getTableExtraClassesString()
  {
    $classes_html = '';

    if( ! empty($this->table_extra_classes) )
    {
      foreach($this->table_extra_classes as $class)
      {
        $classes_html.= "{$class} ";
      }
    }

    return $classes_html;
  }
384566
public function getHTML()
    {
        $dom = new DOMDocument();

        $interceptor = new ErrorInterceptor(array($dom, 'loadHTML'));
        $interceptor->registerError(E_WARNING, "DOMDocument::loadHTML");

        $interceptor->execute($this->html);
        $body = $dom->getElementsByTagName('body')->item(0);

        $this->sanitizeNode($body);

        $html = "";
        foreach ($body->childNodes as $n)
            $html .= $dom->saveHTML($n);

        return $html;
    }
904557
public function getErrorDescription(): string
    {
        if (isset(self::$errorReasons[$this->statusCode][$this->errorReason])) {
            return self::$errorReasons[$this->statusCode][$this->errorReason];
        }

        return '';
    }
866902
protected function errorAction(): string
    {
        foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $propertyPath => $errors) {
            foreach ($errors as $error) {
                $this->flashMessageContainer->addMessage($error);
            }
        }

        return parent::errorAction();
    }
1217547
protected function renderError()
    {
        $errMessage = $this->errMessage;
        $errFile = $this->errFile;
        $errLine = $this->errLine;

        \ob_start();
        require __DIR__ . '/templates/trace.error.phtml';

        return \ob_get_clean();
    }