Skip to content

Commit

Permalink
Print offending bind error in panic message
Browse files Browse the repository at this point in the history
This gives better debug experience, for free.
  • Loading branch information
wprzytula authored and bluejekyll committed Jun 20, 2023
1 parent a614257 commit dc14427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/src/trust-dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ fn main() {
info!("binding UDP to {:?}", udp_socket);
let udp_socket = runtime
.block_on(UdpSocket::bind(udp_socket))
.unwrap_or_else(|_| panic!("could not bind to udp: {}", udp_socket));
.unwrap_or_else(|err| panic!("could not bind to UDP socket {udp_socket}: {err}"));

info!(
"listening for UDP on {:?}",
Expand Down

0 comments on commit dc14427

Please sign in to comment.