Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Error.php

function Error::updateMessage

Updates the exception message after a change to rawMessage or rawLine.

4 calls to Error::updateMessage()
Error::setAttributes in vendor/nikic/php-parser/lib/PhpParser/Error.php
Sets the attributes of the node/token the error occurred at.
Error::setRawMessage in vendor/nikic/php-parser/lib/PhpParser/Error.php
Sets the line of the PHP file the error occurred in.
Error::setStartLine in vendor/nikic/php-parser/lib/PhpParser/Error.php
Sets the line the error starts in.
Error::__construct in vendor/nikic/php-parser/lib/PhpParser/Error.php
Creates an Exception signifying a parse error.

File

vendor/nikic/php-parser/lib/PhpParser/Error.php, line 164

Class

Error

Namespace

PhpParser

Code

protected function updateMessage() : void {
    $this->message = $this->rawMessage;
    if (-1 === $this->getStartLine()) {
        $this->message .= ' on unknown line';
    }
    else {
        $this->message .= ' on line ' . $this->getStartLine();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal