X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=peer_protocol%2Fut-holepunch%2Ferr-code.go;h=7cc61db736fd474f2d3dd731e372079a3e6201ac;hb=60db1104397f6e4eb581e6fc2dec428702d2455e;hp=42b1db1adf3f31d8abbb707918d3de20d92e9c2a;hpb=5fa3710d7fe69252c6608c6af32cf189c1abf6e4;p=btrtrc.git diff --git a/peer_protocol/ut-holepunch/err-code.go b/peer_protocol/ut-holepunch/err-code.go index 42b1db1a..7cc61db7 100644 --- a/peer_protocol/ut-holepunch/err-code.go +++ b/peer_protocol/ut-holepunch/err-code.go @@ -1,5 +1,9 @@ package utHolepunch +import ( + "fmt" +) + type ErrCode uint32 var _ error = ErrCode(0) @@ -22,6 +26,6 @@ func (ec ErrCode) Error() string { case NoSelf: return "the target endpoint belongs to the relaying peer" default: - panic(ec) + return fmt.Sprintf("error code %d", ec) } }