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

Breadcrumb

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

function Scanner::error

Throws a syntax error

Parameters

string $message Error message:

Return value

void

Throws

Exception

9 calls to Scanner::error()
Scanner::consumeExponentPart in vendor/mck89/peast/lib/Peast/Syntax/Scanner.php
Consumes the exponent part of a number
Scanner::consumeNumbers in vendor/mck89/peast/lib/Peast/Syntax/Scanner.php
Consumes the maximum number of digits
Scanner::getToken in vendor/mck89/peast/lib/Peast/Syntax/Scanner.php
Returns the current token
Scanner::reconsumeCurrentTokenAsRegexp in vendor/mck89/peast/lib/Peast/Syntax/Scanner.php
Tries to reconsume the current token as a regexp if possible
Scanner::scanNumber in vendor/mck89/peast/lib/Peast/Syntax/Scanner.php
Number scanning method

... See full list

File

vendor/mck89/peast/lib/Peast/Syntax/Scanner.php, line 650

Class

Scanner
Base class for scanners.

Namespace

Peast\Syntax

Code

protected function error($message = null) {
    if (!$message) {
        $message = "Unexpected " . $this->charAt();
    }
    throw new Exception($message, $this->getPosition(true));
}

API Navigation

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