[tor-commits] [goptlib/master] ptErr isn't exposed.
dcf at torproject.org
dcf at torproject.org
Wed Nov 27 06:07:29 UTC 2013
commit c36f6116428cbf66f4687dbd5042c1c42f04a560
Author: David Fifield <david at bamsoftware.com>
Date: Mon Nov 25 21:47:21 2013 -0800
ptErr isn't exposed.
---
pt.go | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/pt.go b/pt.go
index b2ec0fe..03c2314 100644
--- a/pt.go
+++ b/pt.go
@@ -163,23 +163,26 @@ func doError(keyword string, v ...string) *ptErr {
return &ptErr{keyword, v}
}
-// Emit an ENV-ERROR line with explanation text. Return the error as a ptErr.
+// Emit an ENV-ERROR line with explanation text. Returns a representation of the
+// error.
func EnvError(msg string) error {
return doError("ENV-ERROR", msg)
}
-// Emit a VERSION-ERROR line with explanation text. Return the error as a ptErr.
+// Emit a VERSION-ERROR line with explanation text. Returns a representation of
+// the error.
func VersionError(msg string) error {
return doError("VERSION-ERROR", msg)
}
-// Emit a CMETHOD-ERROR line with explanation text. Return the error as a ptErr.
+// Emit a CMETHOD-ERROR line with explanation text. Returns a representation of
+// the error.
func CmethodError(methodName, msg string) error {
return doError("CMETHOD-ERROR", methodName, msg)
}
-// Emit an SMETHOD-ERROR line with explanation text. Return the error as a
-// ptErr.
+// Emit an SMETHOD-ERROR line with explanation text. Returns a representation of
+// the error.
func SmethodError(methodName, msg string) error {
return doError("SMETHOD-ERROR", methodName, msg)
}
More information about the tor-commits
mailing list