Skip to content

Commit 0e57e88

Browse files
authored
Merge pull request #30 from jelu/trace-reply-err
Traceroute.Reply.Err
2 parents 9ad3c83 + 9726a3f commit 0e57e88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

measurement/traceroute/reply.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ func (r *Reply) X() string {
6262
// "A" (administratively prohibited), "P" (protocol unreachable),
6363
// "p" (port unreachable) "h" (beyond scope, from fw 4650) (optional).
6464
func (r *Reply) Err() string {
65-
return r.data.Err.(string)
65+
if err, ok := r.data.Err.(string); ok {
66+
return err
67+
}
68+
return ""
6669
}
6770

6871
// IPv4 or IPv6 source address in reply.

0 commit comments

Comments
 (0)