+impl fmt::Display for PingError {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ PingError::SocketReceiveError(error) => {
+ write!(f, "Didn't receive any response from watchdog: {}", error)
+ }
+ PingError::SocketSendError(error) => {
+ write!(f, "Unable to send the message: {}", error)
+ }
+ PingError::WrongMessageReceived(message) => {
+ write!(f, "Watchdog replay with a wrong message: {}", message)
+ }
+ }
+ }
+}
+