1
0
mirror of https://github.com/danog/byte-stream.git synced 2024-11-30 04:19:23 +01:00
byte-stream/lib/PendingReadError.php
Aaron Piotrowski e7f7326363 PendingReadException → PendingReadError
Consecutive reads is a coding error, so it should be an instance of Error.
2017-05-12 00:06:07 -05:00

17 lines
452 B
PHP

<?php
namespace Amp\ByteStream;
/**
* Thrown in case a second read operation is attempted while another read operation is still pending.
*/
class PendingReadError extends \Error {
public function __construct(
string $message = "The previous read operation must complete before read can be called again",
int $code = 0,
\Throwable $previous = null
) {
parent::__construct($message, $code, $previous);
}
}