Returns the error message for the last XML error that occured.
@see libxml_get_last_error

@return String|null Last XML error message or null if no error
765154
private function getLastXMLErrorMessage()
    {
        $errorMessage = null;
        $error = libxml_get_last_error();

        if ($error !== false) {
            $errorMessage = trim($error->message);
        }

        return $errorMessage;
    }
429994
public function getError()
	{
		if($this->lastStmt)
		{
			$errorInfo = $this->lastStmt->errorInfo();
		}
		else
		{
			$errorInfo = $this->handler->errorInfo();
		}
		return implode(' ',$errorInfo);
	}
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);
    }
1331667
public function getMessage()
    {
        if (!$this->isSuccessful() && isset($this->data['errorCode'])) {
            return $this->data['errorCode'] . ': ' . $this->data['message'];
        }

        if (!$this->isSuccessful() && isset($this->data['responseCode'])) {
            return $this->data['responseCode'] . ': ' . $this->data['responseMessage'];
        }

        return null;
    }
367033
public function last()
    {
        $last = null;
        foreach ($this->each() as $v) {
            $last = $v;
        }
        return $last;
    }
1138006
public function getLastChild()
	{
		if ( ! $this->hasChildren()) {
			return null;
		}
		$right = $this->getRightValue() - 1;

		$searchCondition = $this->repository->createSearchCondition()
				->rightEqualsTo($right);

		$lastChild = $this->repository->search($searchCondition);
		if ( ! isset($lastChild[0])) {
			$dump = static::dump($this);
			throw new Exception\InvalidStructure("Could not find the last child of {$dump} but it must exist");
		}
		$lastChild = $lastChild[0];
		
		return $lastChild;
	}
1321391
public function getLastErrorMessage()
    {
        $message = null;
        $error = $this->getConnection()->errorInfo();

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

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

        return '';
    }
553679
public function getLastError()
    {
        if($this->lastError) {
            return $this->lastError->getMessage();
        }
        $error = $this->pdo->errorInfo();
        if ($error[1]) {
            print_debug($error);
        }
        return $error[2];
    }
1296199
public function getLastError($attribute = null)
    {
        if (empty($this->errors)) {
            return null;
        }
        if (isset($attribute)) {
            if (isset($this->errors[$attribute])) {
                return end($this->errors[$attribute]);
            }
            return null;
        }
        $error = end($this->errors);
        if (is_array($error)) {
            return end($error);
        }
        return $error;
    }
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;
	}
1191409
public function get_last_error() {
        $retErrors = sqlsrv_errors(SQLSRV_ERR_ALL);
        $errorMessage = 'No errors found';

        if ($retErrors != null) {
            $errorMessage = '';

            foreach ($retErrors as $arrError) {
                $errorMessage .= "SQLState: ".$arrError['SQLSTATE']."<br>\n";
                $errorMessage .= "Error Code: ".$arrError['code']."<br>\n";
                $errorMessage .= "Message: ".$arrError['message']."<br>\n";
            }
        }

        return $errorMessage;
    }
695640
public function getMessage()
    {
        $message = null;

        if (isset($this->data->transactionResponse->messages)) {
            // In case of a successful transaction, a "messages" element is present
            $message = (string)$this->data->transactionResponse->messages->message->description;
        } elseif (isset($this->data->transactionResponse->errors)) {
            // In case of an unsuccessful transaction, an "errors" element is present
            $message = (string)$this->data->transactionResponse->errors->error->errorText;
        } elseif (isset($this->data->messages->message)) {
            // In case of invalid request, the top-level message provides details.
            $message = (string)$this->data->messages->message->text;
        }

        return $message;
    }
1304625
public function getLastErrorMessages()
    {
        $message = '';

        if ($this->hasError()) {

            foreach ($this->errors as $exception) {
                $message .= $exception->getMessage() . ',' . PHP_EOL;
            }
        }

        return $message;
    }
703859
public function last(): string
    {
        $this->rewind();
        $previousElement = $this->getCurrentElement();
        while ($this->valid()) {
            $previousElement = $this->getCurrentElement();
            $this->next();
        }
        return $previousElement->getValue();
    }
553724
final public function getError($i = null, $toString = true)
    {

        // Find the error
        if ($i === null) {
            // Default, return the last message
            $error = end(self::$errors);
        } else
            if (!array_key_exists($i, self::$errors)) {
                // If $i has been specified but does not exist, return false
                return false;
            } else {
                $error = self::$errors[$i];
            }

        return $error;
    }
106216
public function getError() : ?string 
    {
        if ( ! $this->hasError()) {
            $this->setError($this->getDefaultError());
        }
        return $this->error;
    }