2017-04-30 08:31:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Amp\ByteStream;
|
2017-05-07 22:14:45 +02:00
|
|
|
|
2017-04-30 08:31:53 +02:00
|
|
|
/**
|
|
|
|
* Thrown in case a second read operation is attempted while another read operation is still pending.
|
|
|
|
*/
|
2018-09-21 22:45:13 +02:00
|
|
|
final class PendingReadError extends \Error
|
|
|
|
{
|
2017-04-30 08:31:53 +02:00
|
|
|
public function __construct(
|
2017-05-12 07:06:07 +02:00
|
|
|
string $message = "The previous read operation must complete before read can be called again",
|
|
|
|
int $code = 0,
|
|
|
|
\Throwable $previous = null
|
2017-04-30 08:31:53 +02:00
|
|
|
) {
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
|
|
}
|
2017-05-07 22:14:45 +02:00
|
|
|
}
|