Documentation

ParseException extends RuntimeException
in package

Exception class thrown when an error occurs during parsing.

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$parsedFile  : string|null
$parsedLine  : int
$rawMessage  : string
$snippet  : string|null
__construct()  : mixed
getParsedFile()  : string
Gets the filename where the error occurred.
getParsedLine()  : int
Gets the line where the error occurred.
getSnippet()  : string
Gets the snippet of code near the error.
setParsedFile()  : mixed
Sets the filename where the error occurred.
setParsedLine()  : mixed
Sets the line where the error occurred.
setSnippet()  : mixed
Sets the snippet of code near the error.
updateRepr()  : mixed

Properties

Methods

__construct()

public __construct(string $message[, int $parsedLine = -1 ][, string|null $snippet = null ][, string|null $parsedFile = null ][, Throwable $previous = null ]) : mixed
Parameters
$message : string

The error message

$parsedLine : int = -1

The line where the error occurred

$snippet : string|null = null

The snippet of code near the problem

$parsedFile : string|null = null

The file name where the error occurred

$previous : Throwable = null
Return values
mixed

getParsedFile()

Gets the filename where the error occurred.

public getParsedFile() : string

This method returns null if a string is parsed.

Return values
string

getParsedLine()

Gets the line where the error occurred.

public getParsedLine() : int
Return values
int

getSnippet()

Gets the snippet of code near the error.

public getSnippet() : string
Return values
string

setParsedFile()

Sets the filename where the error occurred.

public setParsedFile(string $parsedFile) : mixed
Parameters
$parsedFile : string
Return values
mixed

setParsedLine()

Sets the line where the error occurred.

public setParsedLine(int $parsedLine) : mixed
Parameters
$parsedLine : int
Return values
mixed

setSnippet()

Sets the snippet of code near the error.

public setSnippet(string $snippet) : mixed
Parameters
$snippet : string
Return values
mixed

updateRepr()

private updateRepr() : mixed
Return values
mixed

Search results