summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-06-20 13:17:32 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-06-20 15:31:50 +0900
commitc3d99e9959da8bb6cf1e5bb797bc29b6e1d62f18 (patch)
treedcea2e3c053f38e0b609347a3e7d4aefb7dee549 /packet/bgp.go
parent51f1c2b644e8fac485db45b571520b31a6cb0da0 (diff)
packet: make debug message more helpful
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 0797465b..e8ebe3e0 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -19,7 +19,6 @@ import (
"bytes"
"encoding/binary"
"encoding/json"
- "errors"
"fmt"
"github.com/osrg/gobgp/api"
"math"
@@ -1710,7 +1709,7 @@ func routeFamilyPrefix(afi uint16, safi uint8) (prefix AddrPrefixInterface, err
case RF_ENCAP:
prefix = NewEncapNLRI("")
default:
- return nil, errors.New("unknown route family")
+ return nil, fmt.Errorf("unknown route family. AFI: %d, SAFI: %d", afi, safi)
}
return prefix, nil
}