class FrontMatterParseException extends InvalidDataTypeException (View source)

Defines a class for front matter parsing exceptions.

Properties

protected int $sourceLine

The line number of where the parse error occurred.

Methods

__construct(InvalidDataTypeException $exception)

Constructs a new FrontMatterParseException instance.

int
getSourceLine()

Retrieves the line number where the parse error occurred.

Details

__construct(InvalidDataTypeException $exception)

Constructs a new FrontMatterParseException instance.

Parameters

InvalidDataTypeException $exception

The exception thrown when attempting to parse front matter data.

int getSourceLine()

Retrieves the line number where the parse error occurred.

This line number is in relation to where the parse error occurred in the source front matter content. It is different from \Exception::getLine() which is populated with the line number of where this exception was thrown in PHP.

Return Value

int

The source line number.