php-dextrin

BinaryError extends RuntimeException
in package
implements HasOffset, HasCategory

FinalYes

Error type for malformed `.dxnb` input -- the binary-side analog of `Text\ParseError`.

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

$byteOffset  : int|null

Methods

__construct()  : mixed
category()  : string
DXN.md §5's category for a malformed .dxnb document.
offset()  : int|null

Properties

Methods

__construct()

public __construct(string $message[, int|null $byteOffset = null ]) : mixed
Parameters
$message : string
$byteOffset : int|null = null

category()

DXN.md §5's category for a malformed .dxnb document.

public category() : string
Return values
string

offset()

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

Search results