Skip to content

Commit f41cf7f

Browse files
committed
Allow SerializationException to bubble up through Channel
1 parent 1bbc6d4 commit f41cf7f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/Channel.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Amp\Sync;
44

55
use Amp\Cancellation;
6+
use Amp\Serialization\SerializationException;
67

78
/**
89
* Interface for sending messages between execution contexts, such as two coroutines or two processes.
@@ -19,13 +20,15 @@ interface Channel
1920
* @return TReceive Data received.
2021
*
2122
* @throws ChannelException If receiving from the channel fails or the channel closed.
23+
* @throws SerializationException If the underlying transport mechanism uses serialization and fails.
2224
*/
2325
public function receive(?Cancellation $cancellation = null): mixed;
2426

2527
/**
2628
* @param TSend $data
2729
*
2830
* @throws ChannelException If sending on the channel fails or the channel is already closed.
31+
* @throws SerializationException If the underlying transport mechanism uses serialization and fails.
2932
*/
3033
public function send(mixed $data): void;
3134

0 commit comments

Comments
 (0)