ParseException
extends RuntimeException
in package
Exception class thrown when an error occurs during parsing.
Tags
Table of Contents
- $parsedFile : mixed
- $parsedLine : mixed
- $rawMessage : mixed
- $snippet : mixed
- __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
$parsedFile
private
mixed
$parsedFile
$parsedLine
private
mixed
$parsedLine
$rawMessage
private
mixed
$rawMessage
$snippet
private
mixed
$snippet
Methods
__construct()
public
__construct(string $message[, int $parsedLine = -1 ][, string|null $snippet = null ][, string|null $parsedFile = null ][, Exception|null $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 : Exception|null = null
-
The previous exception
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 —The filename
getParsedLine()
Gets the line where the error occurred.
public
getParsedLine() : int
Return values
int —The file line
getSnippet()
Gets the snippet of code near the error.
public
getSnippet() : string
Return values
string —The snippet of code
setParsedFile()
Sets the filename where the error occurred.
public
setParsedFile(string $parsedFile) : mixed
Parameters
- $parsedFile : string
-
The filename
Return values
mixed —setParsedLine()
Sets the line where the error occurred.
public
setParsedLine(int $parsedLine) : mixed
Parameters
- $parsedLine : int
-
The file line
Return values
mixed —setSnippet()
Sets the snippet of code near the error.
public
setSnippet(string $snippet) : mixed
Parameters
- $snippet : string
-
The code snippet
Return values
mixed —updateRepr()
private
updateRepr() : mixed