diff options
author | gilles henaux <gill.henaux@gmail.com> | 2023-01-11 19:54:05 +0100 |
---|---|---|
committer | gilles henaux <gill.henaux@gmail.com> | 2023-01-11 19:54:05 +0100 |
commit | bc776fa4475549a0458007371893af1710c38cdb (patch) | |
tree | 8013d31b577dcec0accfa40b66e0ebd57ffc69c4 /src | |
parent | 47a272b0ce880a51a8f4502dc72a6ed0926f94a5 (diff) |
[errors] New error types
Diffstat (limited to 'src')
-rw-r--r-- | src/shared.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/shared.rs b/src/shared.rs index 821b2ef..5e912af 100644 --- a/src/shared.rs +++ b/src/shared.rs @@ -27,12 +27,18 @@ pub enum QuinnetError { CertificateGenerationFailed(#[from] RcgenError), #[error("Client with id `{0}` is unknown")] UnknownClient(ClientId), + #[error("Client with id `{0}` is already disconnected")] + ClientAlreadyDisconnected(ClientId), #[error("Connection with id `{0}` is unknown")] UnknownConnection(ConnectionId), - #[error("Connection is closed")] + #[error("Connection is 'disconnected'")] ConnectionClosed, + #[error("Connection is already closed")] + ConnectionAlreadyClosed, #[error("Channel with id `{0}` is unknown")] UnknownChannel(ChannelId), + #[error("Channel is already closed")] + ChannelAlreadyClosed, #[error("The connection has no default channel")] NoDefaultChannel, #[error("Endpoint is already closed")] @@ -43,7 +49,9 @@ pub enum QuinnetError { Deserialization, #[error("The data could not be sent on the channel because the channel is currently full and sending would require blocking")] FullQueue, - #[error("The receiving half of the channel was explicitly closed or has been dropped")] + #[error( + "The receiving half of the internal channel was explicitly closed or has been dropped" + )] InternalChannelClosed, #[error("The hosts file is invalid")] InvalidHostFile, |