Returns output, including self::ERROR_TEXT if an error occurs.

@param null $tpl
@return mixed
174584
public function getOutput($tpl = null)
    {
        $output = $this->fetch($tpl);
        if ($this->isError($output)) {
            $text = $this->configList[self::ERROR_TEXT];
            return $text; //TODO: escape this output?
        } else {
            return $output;
        }
    }
683304
protected function _process($tpl) {
        $this->_display_html = '';
        \extract($this->_vars);

        \ob_start();
        include "{$this->_template_dir}/{$tpl}";
        $this->_display_html .= \ob_get_contents();
        \ob_end_clean();

        $display_html = $this->_display_html;
        $this->_clear();
        return $display_html;
    }
1321391
public function getLastErrorMessage()
    {
        $message = null;
        $error = $this->getConnection()->errorInfo();

        if (is_array($error) && isset($error[2])) {
            $message = $error[2];
        }

        return $message;
    }
1048758
public function getError(): string
    {
        foreach ($this->getBulkResponses() as $bulkResponse) {
            if ($bulkResponse->hasError()) {
                return $bulkResponse->getError();
            }
        }

        return '';
    }
145539
public function display($tpl = null)
	{
		$result = $this->loadTemplate($tpl);

		if ($result instanceof Exception)
		{
			return $result;
		}

		echo $result;
	}
1049581
public function getError() {
        if ($this->error) {
            return $this->translate($this->error);
        }
        if ($this->form->model && is_object($this->form->model) && $this->form->model->hasErrors($this->name)) {
            $errors = $this->form->model->getErrors($this->name);
            foreach ($errors as &$message) {
                $message = $this->translate($message);
            }
            return $errors;
        }
        return null;
    }
501587
public function fetch($tpl = null)
    {
        // make sure we have a template source to work with
        if (is_null($tpl)) {
            $tpl = $this->configList[self::TPL_FILE];
        }
        $result = $this->getPathToTemplate($tpl);

        if (! $result || $this->isError($result)) { //if no path
            return $result;
        } else {
            $this->configList[self::FETCHED_TPL_FILE] = $result;
            unset($result);
            unset($tpl);

            // buffer output so we can return it instead of displaying.
            ob_start();

            include $this->configList[self::FETCHED_TPL_FILE];
            $this->configList[self::FETCHED_TPL_FILE] = null; //flush fetched script value

            return ob_get_clean();
        }
    }
790570
public function display($tpl = null)
	{
		$this->form = $this->get('Form');
		$this->item = $this->get('Item');
		$this->state = $this->get('State');
		$section = $this->state->get('category.section') ? $this->state->get('category.section') . '.' : '';
		$this->canDo = JHelperContent::getActions($this->state->get('category.component'), $section . 'category', $this->item->id);
		$this->assoc = $this->get('Assoc');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));

			return false;
		}

		JFactory::getApplication()->input->set('hidemainmenu', true);

		if ($this->getLayout() == 'modal')
		{
			$this->form->setFieldAttribute('language', 'readonly', 'true');
			$this->form->setFieldAttribute('parent_id', 'readonly', 'true');
		}

		$this->addToolbar();

		return parent::display($tpl);
	}
1205733
public function display($tpl = null)
	{
		$state  = $this->get('State');
		$items  = $this->get('Items');
		$parent = $this->get('Parent');

		$app = JFactory::getApplication();

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			$app->enqueueMessage($errors, 'error');

			return false;
		}

		if ($items === false)
		{
			$app->enqueueMessage(JText::_('JGLOBAL_CATEGORY_NOT_FOUND'), 'error');

			return false;
		}

		if ($parent == false)
		{
			$app->enqueueMessage(JText::_('JGLOBAL_CATEGORY_NOT_FOUND'), 'error');

			return false;
		}

		$params = &$state->params;

		$items = array($parent->id => $items);

		// Escape strings for HTML output
		$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'), ENT_COMPAT, 'UTF-8');

		$this->maxLevelcat = $params->get('maxLevelcat', -1) < 0 ? PHP_INT_MAX : $params->get('maxLevelcat', PHP_INT_MAX);
		$this->params      = &$params;
		$this->parent      = &$parent;
		$this->items       = &$items;

		$this->prepareDocument();

		return parent::display($tpl);
	}
992045
public function getResult()
	{
		$result = $this->error ?? $this->result ?? null;
		if ($result === null) {
			return null;
		}

		return Dumper::toHtml($result, [
			Dumper::COLLAPSE => true
		]);
	}
75452
private function tpl(): string
    {
        if (interface_exists($this->type)) {
            return 'Return value of %s must implement interface %s, %s returned';
        }

        if (class_exists($this->type)) {
            return 'Return value of %s must be an instance of %s, %s returned';
        }

        if ($this->type == 'callable') {
            return 'Return value of %s must be %s, %s returned';
        }

        return 'Return value of %s must be of the type %s, %s returned';
    }
596184
public function getErrorText()
    {
        $message = '';
        if ($this->isError()) {
            $message = $this->messages->message[0]->text;
            if (@$this->transactionResponse->errors[0]->errorText) {
                $message = $this->transactionResponse->errors[0]->errorText;
            }
        }
        return $message;
    }
1364507
function error( $text, $position = false )
    {
        if ( $position )
        {
            $str = $position['file'] . ':' . $position['from'][0] . ' C' . $position['from'][1];
            if ( isset( $position['to'] ) )
                $str .= ' -> L' . $position['to'][0] . ' C' . $position['to'][1];
            $str .= ':';
        }
        $str .= $text;
        if ( class_exists( 'ezcli' ) )
        {
            $cli = eZCLI::instance();
            $cli->error( $str );
        }
        else
        {
            eZDebug::writeError( $str, __METHOD__ );
        }
    }
1181029
public static function display($tpl, $variablesDefinitions = NULL, $indent = NULL) {
    $html = self::get($tpl, $variablesDefinitions, $indent);
    print $html;
  }
68671
public function rethrow($err, int $lineno = null, string $tplname = null)
    {
        if (is_string($err) || $err instanceof \ErrorException) {
            if (Sdopx::$debug && $lineno && $tplname) {
                list($name, $type) = Utils::parseResourceName($tplname);
                $instance = Sdopx::getResource($type);
                $content = $instance->getContent($name, $this);
                $lines = explode("\n", $content);
                $len = count($lines);
                $start = ($lineno - 3) < 0 ? 0 : $lineno - 3;
                $end = ($lineno + 3) >= $len ? $len - 1 : $lineno + 3;
                $lines = array_slice($lines, $start, $end - $start, true);
                foreach ($lines as $idx => &$line) {
                    $curr = $idx + 1;
                    $line = ($curr == $lineno ? ' >> ' : '    ') . $curr . '| ' . $line;
                }
                $context = join("\n", $lines);
                $stack = $tplname . ':' . $lineno . "\n" . $context . "\n";
                if (is_string($err)) {
                    throw new SdopxException($err, $stack);
                } else {
                    if ($err->getSeverity() == E_NOTICE) {
                        $stack = $tplname . ':' . $lineno . "\n" . $context . "\n";
                        throw new SdopxException($err->getMessage(), $stack, $err->getCode(), $err);
                    } else {
                        throw $err;
                    }
                }
            }
            if (is_string($err)) {
                throw new SdopxException($err);
            } else {
                throw $err;
            }
        }
        throw $err;
    }
214335
function payload()
    {
        if ( $this->IsFault )
        {
            return json_encode( array(
                'content' => null,
                'error_text' => $this->FaultString() ) );
        }
        else
        {
            return json_encode( array(
                'content' => $this->Value,
                'error_text' => null ) );
        }
    }
41153
public function getAllError($t='text'){
			$tmp='';
			if(count($this->allError)>0){
				$tmp='<table>';
				for ($i=0; $i < count($this->allError); $i++) {
					$tmp.='<tr>';
					$tmp.='	<td width="100">#ERRO N&deg; '.($i+1).'</td>';
					$tmp.='	<td>SQL: '.strip_tags($this->getLastQuery()).'</td>';
					$tmp.='</tr>';
					$tmp.='<tr> <td></td><td><i>'.$this->allError[$i].'</i></td></tr>';
					$tmp.='<tr> <td colspan="2" height="15"></td></tr>';
				}
				$tmp.='</table>';
			}
			if($t=='array'){
				return $this->allError;
			}else{
				return $tmp;
			}
		}