summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--talpid-routing/src/unix/macos/mod.rs7
-rw-r--r--talpid-routing/src/unix/macos/routing_socket.rs6
-rw-r--r--talpid-routing/src/unix/macos/watch.rs6
3 files changed, 12 insertions, 7 deletions
diff --git a/talpid-routing/src/unix/macos/mod.rs b/talpid-routing/src/unix/macos/mod.rs
index 35220b45f8..3b3a0968f0 100644
--- a/talpid-routing/src/unix/macos/mod.rs
+++ b/talpid-routing/src/unix/macos/mod.rs
@@ -363,7 +363,12 @@ impl RouteManagerImpl {
// ignore all other message types
Ok(_) => {}
Err(err) => {
- log::error!("Failed to receive a message from the routing table: {err}");
+ log::error!(
+ "{}",
+ err.display_chain_with_msg(
+ "Failed to receive a message from the routing table"
+ )
+ );
}
}
}
diff --git a/talpid-routing/src/unix/macos/routing_socket.rs b/talpid-routing/src/unix/macos/routing_socket.rs
index 14e8ee088d..835e7d6edc 100644
--- a/talpid-routing/src/unix/macos/routing_socket.rs
+++ b/talpid-routing/src/unix/macos/routing_socket.rs
@@ -23,11 +23,11 @@ use tokio::io::{unix::AsyncFd, AsyncWrite, AsyncWriteExt};
#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Failed to open routing socket")]
- OpenSocket(io::Error),
+ OpenSocket(#[source] io::Error),
#[error("Failed to write to routing socket")]
- Write(io::Error),
+ Write(#[source] io::Error),
#[error("Failed to read from routing socket")]
- Read(io::Error),
+ Read(#[source] io::Error),
#[error("Received a message that's too small")]
MessageTooSmall(usize),
#[error("Failed to receive response to route message")]
diff --git a/talpid-routing/src/unix/macos/watch.rs b/talpid-routing/src/unix/macos/watch.rs
index 20dc988086..1cef2e4205 100644
--- a/talpid-routing/src/unix/macos/watch.rs
+++ b/talpid-routing/src/unix/macos/watch.rs
@@ -10,14 +10,14 @@ type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
/// Generic routing socket error
- #[error("Routing socket error: {0}")]
- RoutingSocket(routing_socket::Error),
+ #[error("Routing socket error")]
+ RoutingSocket(#[source] routing_socket::Error),
/// Failed to parse route message
#[error("Invalid message")]
InvalidMessage(data::Error),
/// Failed to send route message
#[error("Failed to send routing message")]
- Send(routing_socket::Error),
+ Send(#[source] routing_socket::Error),
/// Received unexpected response to route message
#[error("Unexpected message type")]
UnexpectedMessageType(RouteSocketMessage, MessageType),