ParseException

Extends \RuntimeException Implements \Symfony\Component\Yaml\Exception\ExceptionInterface

Exception class thrown when an error occurs during parsing.

author

Fabien Potencier

api

Methods

Constructor.

__construct(string $message, integer $parsedLine = -1, integer $snippet = null, $parsedFile = null, \Symfony\Component\Yaml\Exception\Exception $previous = null) 

Arguments

$message

string

The error message

$parsedLine

integer

The line where the error occurred

$snippet

integer

The snippet of code near the problem

$parsedFile

$previous

\Symfony\Component\Yaml\Exception\Exception

The previous exception

Gets the snippet of code near the error.

getSnippet() : string

Response

string

The snippet of code

Sets the snippet of code near the error.

setSnippet($snippet) 

Arguments

$snippet

Gets the filename where the error occurred.

getParsedFile() : string

This method returns null if a string is parsed.

Response

string

The filename

Sets the filename where the error occurred.

setParsedFile(string $parsedFile) 

Arguments

$parsedFile

string

The filename

Gets the line where the error occurred.

getParsedLine() : integer

Response

integer

The file line

Sets the line where the error occurred.

setParsedLine(integer $parsedLine) 

Arguments

$parsedLine

integer

The file line

updateRepr

updateRepr() 

Properties

parsedFile

parsedFile : 

parsedLine

parsedLine : 

snippet

snippet : 

rawMessage

rawMessage :