-
Extends
Exception RuntimeException -
Implements
Stringable Throwable
Methods |
public
__construct
(
string
$message
,
$attributes
=
[
]
) Creates an Exception signifying a parse error. |
public
getAttributes
() :
array
Gets the attributes of the node/token the error occurred at.
|
public
getEndColumn
(
string
$code
) :
int
Gets the end column (1-based) into the line where the error ended.
|
public
getEndLine
() :
int
Gets the line the error ends in.
|
public
getMessageWithColumnInfo
(
string
$code
) :
string
Formats message including line and column information.
|
public
getRawMessage
() :
string
Gets the error message
|
public
getStartColumn
(
string
$code
) :
int
Gets the start column (1-based) into the line where the error started.
|
public
getStartLine
() :
int
Gets the line the error starts in.
|
public
hasColumnInfo
() :
bool
Returns whether the error has start and end column information. For column information enable the startFilePos and endFilePos in the lexer options.
|
public
setAttributes
(
array
$attributes
) Sets the attributes of the node/token the error occurred at. |
public
setRawMessage
(
string
$message
) Sets the line of the PHP file the error occurred in. |
public
setStartLine
(
int
$line
) Sets the line the error starts in. |
Properties |
protected $attributes |
protected $rawMessage |
Methods |
protected
updateMessage
() Updates the exception message after a change to rawMessage or rawLine. |
Methods |
private
toColumn
(
string
$code
,
int
$pos
) :
int
Converts a file offset into a column.
|