mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: api_client: streamline error Display::fmt()
The changes were mostly automatically applied using the Python script mentioned in the first commit of this series. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
d7edd9d51f
commit
3f3489e38e
@@ -11,15 +11,15 @@ use vmm_sys_util::sock_ctrl_msg::ScmSocket;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[error("Error writing to or reading from HTTP socket: {0}")]
|
||||
#[error("Error writing to or reading from HTTP socket")]
|
||||
Socket(#[source] std::io::Error),
|
||||
#[error("Error sending file descriptors: {0}")]
|
||||
#[error("Error sending file descriptors")]
|
||||
SocketSendFds(#[source] vmm_sys_util::errno::Error),
|
||||
#[error("Error parsing HTTP status code: {0}")]
|
||||
#[error("Error parsing HTTP status code")]
|
||||
StatusCodeParsing(#[source] std::num::ParseIntError),
|
||||
#[error("HTTP output is missing protocol statement")]
|
||||
MissingProtocol,
|
||||
#[error("Error parsing HTTP Content-Length field: {0}")]
|
||||
#[error("Error parsing HTTP Content-Length field")]
|
||||
ContentLengthParsing(#[source] std::num::ParseIntError),
|
||||
#[error("Server responded with an error: {0:?}: {1:?}")]
|
||||
ServerResponse(StatusCode, Option<String>),
|
||||
|
||||
Reference in New Issue
Block a user