ParseException
class ParseException extends RuntimeException
Exception class thrown when an error occurs during parsing.
Methods
__construct(string $message, int $parsedLine = -1, int $snippet = null, string $parsedFile = null, Exception $previous = null)
Constructor.
string
getSnippet()
Gets the snippet of code near the error.
setSnippet(string $snippet)
Sets the snippet of code near the error.
string
getParsedFile()
Gets the filename where the error occurred.
setParsedFile(string $parsedFile)
Sets the filename where the error occurred.
int
getParsedLine()
Gets the line where the error occurred.
setParsedLine(int $parsedLine)
Sets the line where the error occurred.
Details
at line line 35
__construct(string $message, int $parsedLine = -1, int $snippet = null, string $parsedFile = null, Exception $previous = null)
Constructor.
at line line 52
string
getSnippet()
Gets the snippet of code near the error.
at line line 62
setSnippet(string $snippet)
Sets the snippet of code near the error.
at line line 76
string
getParsedFile()
Gets the filename where the error occurred.
This method returns null if a string is parsed.
at line line 86
setParsedFile(string $parsedFile)
Sets the filename where the error occurred.
at line line 98
int
getParsedLine()
Gets the line where the error occurred.
at line line 108
setParsedLine(int $parsedLine)
Sets the line where the error occurred.