StreamException
extends RuntimeException
in package
Phrity\Net\StreamException class.
Table of Contents
Constants
- CLIENT_CONNECT_ERR = 2000
- COLLECT_KEY_CONFLICT = 4000
- COLLECT_SELECT_ERR = 4001
- FAIL_CONTENTS = 1024
- FAIL_GETS = 1025
- FAIL_READ = 1020
- FAIL_SEEK = 1022
- FAIL_TELL = 1023
- FAIL_WRITE = 1021
- NOT_READABLE = 1010
- NOT_SEEKABLE = 1012
- NOT_WRITABLE = 1011
- SCHEME_HANDLER = 3001
- SCHEME_TRANSPORT = 3000
- SERVER_ACCEPT_ERR = 3012
- SERVER_CLOSED = 3011
- SERVER_SOCKET_ERR = 3010
- STREAM_DETACHED = 1000
Properties
- $messages : mixed
Methods
- __construct() : mixed
- Create exception.
Constants
CLIENT_CONNECT_ERR
public
mixed
CLIENT_CONNECT_ERR
= 2000
COLLECT_KEY_CONFLICT
public
mixed
COLLECT_KEY_CONFLICT
= 4000
COLLECT_SELECT_ERR
public
mixed
COLLECT_SELECT_ERR
= 4001
FAIL_CONTENTS
public
mixed
FAIL_CONTENTS
= 1024
FAIL_GETS
public
mixed
FAIL_GETS
= 1025
FAIL_READ
public
mixed
FAIL_READ
= 1020
FAIL_SEEK
public
mixed
FAIL_SEEK
= 1022
FAIL_TELL
public
mixed
FAIL_TELL
= 1023
FAIL_WRITE
public
mixed
FAIL_WRITE
= 1021
NOT_READABLE
public
mixed
NOT_READABLE
= 1010
NOT_SEEKABLE
public
mixed
NOT_SEEKABLE
= 1012
NOT_WRITABLE
public
mixed
NOT_WRITABLE
= 1011
SCHEME_HANDLER
public
mixed
SCHEME_HANDLER
= 3001
SCHEME_TRANSPORT
public
mixed
SCHEME_TRANSPORT
= 3000
SERVER_ACCEPT_ERR
public
mixed
SERVER_ACCEPT_ERR
= 3012
SERVER_CLOSED
public
mixed
SERVER_CLOSED
= 3011
SERVER_SOCKET_ERR
public
mixed
SERVER_SOCKET_ERR
= 3010
STREAM_DETACHED
public
mixed
STREAM_DETACHED
= 1000
Properties
$messages
private
static mixed
$messages
= [self::STREAM_DETACHED => 'Stream is detached.', self::NOT_READABLE => 'Stream is not readable.', self::NOT_WRITABLE => 'Stream is not writable.', self::NOT_SEEKABLE => 'Stream is not seekable.', self::FAIL_READ => 'Failed read() on stream.', self::FAIL_WRITE => 'Failed write() on stream.', self::FAIL_SEEK => 'Failed seek() on stream.', self::FAIL_TELL => 'Failed tell() on stream.', self::FAIL_CONTENTS => 'Failed getContents() on stream.', self::FAIL_GETS => 'Failed gets() on stream.', self::CLIENT_CONNECT_ERR => 'Client could not connect to "{uri}".', self::SCHEME_TRANSPORT => 'Scheme "{scheme}" is not supported.', self::SCHEME_HANDLER => 'Could not handle scheme "{scheme}".', self::SERVER_SOCKET_ERR => 'Could not create socket for "{uri}".', self::SERVER_CLOSED => 'Server is closed.', self::SERVER_ACCEPT_ERR => 'Could not accept on socket.', self::COLLECT_KEY_CONFLICT => 'Stream with name "{key}" already attached.', self::COLLECT_SELECT_ERR => 'Failed to select streams for reading.']
Methods
__construct()
Create exception.
public
__construct(int $code[, array<string|int, mixed> $data = [] ][, Throwable|null $previous = null ]) : mixed
Parameters
- $code : int
-
Error code
- $data : array<string|int, mixed> = []
-
Additional data
- $previous : Throwable|null = null
-
Previous exception