[tor-commits] [goptlib/master] Put more information in an error.
dcf at torproject.org
dcf at torproject.org
Wed Nov 27 07:51:00 UTC 2013
commit be389272dd608f55b0bc3a5825475654cef3e1a3
Author: David Fifield <david at bamsoftware.com>
Date: Tue Nov 26 22:23:57 2013 -0800
Put more information in an error.
---
pt.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pt.go b/pt.go
index a5a0107..58a6824 100644
--- a/pt.go
+++ b/pt.go
@@ -580,7 +580,7 @@ const (
func extOrPortSendCommand(s io.Writer, cmd uint16, body []byte) error {
var buf bytes.Buffer
if len(body) > 65535 {
- return errors.New("command exceeds maximum length of 65535")
+ return errors.New(fmt.Sprintf("body length %d exceeds maximum of 65535", len(body)))
}
err := binary.Write(&buf, binary.BigEndian, cmd)
if err != nil {
More information about the tor-commits
mailing list