@throws \Twig\Error\LoaderError
@throws \Twig\Error\RuntimeError
@throws \Twig\Error\SyntaxError

@return string
177384
public function render(ResourceObject $ro)
    {
        $ro->view = $this->twig->render($this->errorPage, $ro->body);

        return $ro->view;
    }
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];
    }
670130
public function RenderErrors () {
		/** @var $this \MvcCore\Ext\Forms\IField */
		$result = "";
		if (
			$this->errors && 
			$this->form->GetErrorsRenderMode() !== \MvcCore\Ext\Forms\IForm::ERROR_RENDER_MODE_ALL_TOGETHER
		) {
			$result .= '<span class="errors">';
			foreach ($this->errors as $key => $errorMessage) {
				$errorCssClass = 'error error-' . $this->name . ' error-' . $key;
				$result .= "<span class=\"$errorCssClass\">$errorMessage</span>";
			}
			$result .= '</span>';
		}
		return $result;
	}
1080696
public function getErrorsAsString()
    {
        $string = '';
        foreach ($this->getErrors() as $error) {
            $string .= sprintf(
                "%s: %s",
                $error['field'],
                $error['message']
            );
            if (isset($error['rejected'])) {
                $string .= sprintf(" ('%s' given)", $error['rejected']);
            }
            $string .= ";\n";
        }

        return trim($string);
    }
1258216
public function getErrorMessageFromHandle()
    {
        $errorMessage = null;

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

        return $errorMessage === '' ? null : $errorMessage;
    }
1333691
protected static function handleError()
	{
		if(self::$errorHandler === NULL)
		{
			self::$errorHandler = function ($type, $message, $file, $line) {
				throw new \RuntimeException($message);
			};
		}
		
		return self::$errorHandler;
	}
562161
public function getErrorView()
    {
        if($this->app->exists(ErrorView::class)) {
            return $this->app->get(ErrorView::class);
        }
        $error_files = (array)$this->app->get(Web::ERROR_VIEWS);
        if (empty($error_files)) {
            $this->app->set(ErrorView::class, null, true);
            return null;
        }
        $view = new ErrorView($this->getViewEngine(), $this->web->debug);
        if (isset($error_files[0])) {
            $view->default_error_file = $error_files[0];
            unset($error_files[0]);
        }
        $view->setLogger($this->web->getLog());
        $view->error_files = $error_files;
        $this->app->set(ErrorView::class, $view, true);

        return $view;
    }
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;
    }
94673
public function getContents() : string
    {
        $r = false;
        $err = ($this->stream === null || $this->readable === false);

        if ($err === false) {
            $r = stream_get_contents($this->stream);
        }

        if ($err === true || $r === false) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException("Could not get contents of stream.");
            // @codeCoverageIgnoreEnd
        }

        return $r;
    }
1248577
public function parse()
    {
        if (!is_string($this->data)) {
            throw new \RuntimeException('The given data is no valid string');
        }
        libxml_use_internal_errors(true);
        $xml = simplexml_load_string($this->data);
        if ($xml === false) {
            throw new \RuntimeException('Error during the loading of the XML file');
        }
        if (!isset($xml->executables, $xml->excludes)) {
            throw new \RuntimeException('Missing configuration elements');
        }

        foreach ($xml->excludes->children()->file as $file) {
            $this->config->addExcludedFile((string) $file);
        }

        foreach ($xml->excludes->children()->dir as $dir) {
            $this->config->addExcludedDir((string) $dir);
        }

        foreach ($xml->executables->children() as $file) {
            $this->config->addExecutableFile((string) $file);
        }

        return $this->config;
    }
83930
protected function getHtmlErrorCell(): string
  {
    $ret = '';

    if (!$this->isValid())
    {
      $error_messages = $this->getErrorMessages(true);

      $ret .= '<td class="error">';
      if (!empty($error_messages))
      {
        foreach ($error_messages as $message)
        {
          $ret .= Html::txt2Html($message);
          $ret .= '<br/>';
        }
      }
      $ret .= '</td>';
    }
    else
    {
      $ret .= '<td class="error"></td>';
    }

    return $ret;
  }
164620
public function getFileInfo()
    {
        $upload = new eZContentUpload();
        $errors = array();
        $mimeData = $file = '';
        $result = $upload->fetchHTTPFile( 'UploadFile', $errors, $file, $mimeData );

        if ( $result === false )
        {
            throw new RuntimeException(
                ezpI18n::tr(
                    'extension/ezjscore/ajaxuploader',
                    'Unable to retrieve the uploaded file: %message',
                    null, array( '%message' => $errors[0]['description'] )
                )
            );
        }
        return array(
            'file' => $file,
            'mime' => $mimeData
        );
    }
786851
public function getErrorMessage()
    {
        if (is_string($this->jsonError)) {
            return $this->jsonError;
        } elseif (isset($this->jsonError['message'])) {
            return $this->jsonError['message'];
        }
        return '';
    }
398295
public function getShortError()
	{
		$error	= array_shift( explode( "\n", trim( $this->error ) ) );
		$error	= preg_replace( "@^Parse error: (.*) in (.*) on (.*)$@i", "\\1 on \\3", $error );
		return $error;
	}
866902
protected function errorAction(): string
    {
        foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $propertyPath => $errors) {
            foreach ($errors as $error) {
                $this->flashMessageContainer->addMessage($error);
            }
        }

        return parent::errorAction();
    }
1105992
public function getCode()
    {
        $locator = new TemplateLocator(new FileLocator($this->getTemplateDirs()));
        $templateNameParser = new TemplateNameParser();
        $loader = new FilesystemLoader($locator, $templateNameParser);
        $twig = new \Twig_Environment(
            $loader,
            array(
                'autoescape' => false,
                'strict_variables' => true,
                'debug' => true,
                'cache' => $this->getGenerator()->getTempDir(),
            )
        );

        $this->addTwigExtensions($twig, $loader);
        $this->addTwigFilters($twig);
        $template = $twig->loadTemplate($this->getTemplateName());

        $variables = $this->getVariables();
        $variables['builder'] = $this;

        return $template->render($variables);
    }
188834
public function RenderErrors () {
		$this->form->PreDispatch();
		$result = '';
		$errors = & $this->form->GetErrors();
		if ($errors && $this->form->GetErrorsRenderMode() == \MvcCore\Ext\Forms\IForm::ERROR_RENDER_MODE_ALL_TOGETHER) {
			$result .= '<div class="errors">';
			foreach ($errors as & $errorMessageAndFieldNames) {
				list($errorMessage, $fieldNames) = $errorMessageAndFieldNames;
				$result .= '<div class="error ' . implode(' ', $fieldNames) . '">'.$errorMessage.'</div>';
			}
			$result .= '</div>';
		}
		return $result;
	}