Throw Exceotion instead of Error
parent
b55404154e
commit
ffea1d0c3a
|
@ -32,7 +32,7 @@ class ProtocolStreamWriter implements ProtocolWriter
|
||||||
while ($totalBytesWritten < $msgSize) {
|
while ($totalBytesWritten < $msgSize) {
|
||||||
$bytesWritten = @fwrite($this->output, substr($data, $totalBytesWritten));
|
$bytesWritten = @fwrite($this->output, substr($data, $totalBytesWritten));
|
||||||
if ($bytesWritten === false) {
|
if ($bytesWritten === false) {
|
||||||
throw new Error('Could not write message.');
|
throw new Exception('Could not write message.');
|
||||||
}
|
}
|
||||||
$totalBytesWritten += $bytesWritten;
|
$totalBytesWritten += $bytesWritten;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue