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
Fri, Jul 3, 19:27 (1 d, 11 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f5/a8/a42b6aa3fbd54f13f4f26f1ecc97
Default Alt Text
SyntaxError.php (872 B)

Event Timeline