Class

Symfony\Component\Yaml\Exception\ParseException

class ParseException extends RuntimeException

Exception class thrown when an error occurs during parsing.

Methods

__construct(string $message, integer $parsedLine = -1, integer $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.

integer getParsedLine()

Gets the line where the error occurred.

setParsedLine(integer $parsedLine)

Sets the line where the error occurred.

Details

at line 42
public __construct(string $message, integer $parsedLine = -1, integer $snippet = null, string $parsedFile = null, Exception $previous = null)

Constructor.

Parameters

string $message The error message
integer $parsedLine The line where the error occurred
integer $snippet The snippet of code near the problem
string $parsedFile The file name where the error occurred
Exception $previous The previous exception

at line 59
public string getSnippet()

Gets the snippet of code near the error.

Return Value

string The snippet of code

at line 69
public setSnippet(string $snippet)

Sets the snippet of code near the error.

Parameters

string $snippet The code snippet

at line 83
public string getParsedFile()

Gets the filename where the error occurred.

This method returns null if a string is parsed.

Return Value

string The filename

at line 93
public setParsedFile(string $parsedFile)

Sets the filename where the error occurred.

Parameters

string $parsedFile The filename

at line 105
public integer getParsedLine()

Gets the line where the error occurred.

Return Value

integer The file line

at line 115
public setParsedLine(integer $parsedLine)

Sets the line where the error occurred.

Parameters

integer $parsedLine The file line