Copied!
Instantiable
Methods
public __construct ( string $message , $attributes = [ ] )
 

Creates an Exception signifying a parse error.

public Exception :: __toString () : string
public Exception :: __wakeup ()
public getAttributes () : array
 

Gets the attributes of the node/token the error occurred at.

  • return array
public final Exception :: getCode ()
public getEndColumn ( string $code ) : int
 

Gets the end column (1-based) into the line where the error ended.

  • return int
public getEndLine () : int
 

Gets the line the error ends in.

  • return int Error end line
public final Exception :: getFile () : string
public final Exception :: getLine () : int
public final Exception :: getMessage () : string
public getMessageWithColumnInfo ( string $code ) : string
 

Formats message including line and column information.

  • return string Formatted message
public final Exception :: getPrevious () : Throwable
public getRawMessage () : string
 

Gets the error message

  • return string Error message
public getStartColumn ( string $code ) : int
 

Gets the start column (1-based) into the line where the error started.

  • return int
public getStartLine () : int
 

Gets the line the error starts in.

  • return int Error start line
public final Exception :: getTrace () : array
public final Exception :: getTraceAsString () : string
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.

  • return bool
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 Exception :: $code
protected Exception :: $file
protected Exception :: $line
protected Exception :: $message
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.

  • return int 1-based column (relative to start of line)
© 2020 Bruce Wells
Search Namespaces \ Classes
Configuration Numbers (0-9.) only