Skip to content

Commit ee7c34d

Browse files
committed
Add wrapped strings to error messages
1 parent 5caf81c commit ee7c34d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/test-rpc/src/lib.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ pub enum Error {
1919
Tarpc(#[from] tarpc::client::RpcError),
2020
#[error("Syscall failed")]
2121
Syscall,
22-
#[error("Internal IO error occurred")]
22+
#[error("Internal IO error occurred: {0}")]
2323
Io(String),
2424
#[error("Interface not found")]
2525
InterfaceNotFound,
26-
#[error("HTTP request failed")]
26+
#[error("HTTP request failed: {0}")]
2727
HttpRequest(String),
2828
#[error("Failed to deserialize HTTP body")]
2929
DeserializeBody,
@@ -39,17 +39,17 @@ pub enum Error {
3939
SendUdp,
4040
#[error("Failed to send TCP segment")]
4141
SendTcp,
42-
#[error("Failed to send ping")]
42+
#[error("Failed to send ping: {0}")]
4343
Ping(String),
44-
#[error("Failed to get or set registry value")]
44+
#[error("Failed to get or set registry value: {0}")]
4545
Registry(String),
46-
#[error("Failed to change the service")]
46+
#[error("Failed to change the service: {0}")]
4747
Service(String),
48-
#[error("Could not read from or write to the file system")]
48+
#[error("Could not read from or write to the file system: {0}")]
4949
FileSystem(String),
50-
#[error("Could not serialize or deserialize file")]
50+
#[error("Could not serialize or deserialize file: {0}")]
5151
FileSerialization(String),
52-
#[error("User must be logged in but is not")]
52+
#[error("User must be logged in but is not: {0}")]
5353
UserNotLoggedIn(String),
5454
#[error("Invalid URL")]
5555
InvalidUrl,

0 commit comments

Comments
 (0)