Page MenuHomeWickedGov Phorge

SyntaxError.php
No OneTemporary

Size
872 B
Referenced Files
None
Subscribers
None

SyntaxError.php

<?php
namespace Wikimedia\WikiPEG;
class SyntaxError extends \Exception implements \JsonSerializable {
public $expected;
public $found;
public $location;
/**
* @param string $message
* @param Expectation[] $expected
* @param string|null $found
* @param LocationRange $location
*/
public function __construct( string $message, array $expected, $found, LocationRange $location ) {
parent::__construct( $message );
$this->expected = $expected;
$this->found = $found;
$this->location = $location;
}
/**
* JSON serialization similar to the JavaScript SyntaxError, for testing
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize(): array {
return [
'name' => 'SyntaxError',
'message' => $this->message,
'expected' => $this->expected,
'found' => $this->found,
'location' => $this->location
];
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Oct 3, 14:31 (8 h, 57 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
99/82/159465ac7f41ff48159f2586f5ff
Default Alt Text
SyntaxError.php (872 B)

Event Timeline