php-dextrin

LexError extends RuntimeException
in package
implements HasOffset, HasCategory

FinalYes

Table of Contents

Interfaces

HasOffset
Implemented by any exception that can report a byte/character offset into the source it failed on (lexer/parser errors) -- lets {@see DXNError::wrap()} preserve that offset without needing to know about every concrete exception class in the text/binary pipelines.
HasCategory
Implemented by any exception that knows its DXN.md §5 category -- `syntax`, `binary`, `encode/unsupported`, ... -- so {@see DXNError::wrap()} can carry it across without knowing every concrete exception class, the way {@see HasOffset} carries an offset.

Properties

$codepointOffset  : int

Methods

__construct()  : mixed
category()  : string
DXN.md §5's category for text that does not lex.
offset()  : int

Properties

$codepointOffset read-only

private int $codepointOffset

Methods

__construct()

public __construct(string $message, int $codepointOffset) : mixed
Parameters
$message : string
$codepointOffset : int

category()

DXN.md §5's category for text that does not lex.

public category() : string
Return values
string

offset()

public offset() : int
Return values
int
On this page

Search results