aboutsummaryrefslogtreecommitdiffstats
path: root/errs
diff options
context:
space:
mode:
Diffstat (limited to 'errs')
-rw-r--r--errs/errors.go9
-rw-r--r--errs/errors_test.go2
2 files changed, 2 insertions, 9 deletions
diff --git a/errs/errors.go b/errs/errors.go
index 2e6c32494..face9b947 100644
--- a/errs/errors.go
+++ b/errs/errors.go
@@ -69,7 +69,7 @@ func (self *Errors) New(code int, format string, params ...interface{}) *Error {
func (self Error) Error() (message string) {
if len(message) == 0 {
- self.message = fmt.Sprintf("[%s] %s", self.Package, self.Name)
+ self.message = fmt.Sprintf("[%s] ERROR: %s", self.Package, self.Name)
if self.format != "" {
self.message += ": " + fmt.Sprintf(self.format, self.params...)
}
@@ -81,16 +81,9 @@ func (self Error) Log(v glog.Verbose) {
if v {
v.Infoln(self)
}
- //log.Sendln(self.level, self)
}
/*
-func (self Error) Log(log *logger.Logger) {
- log.Sendln(self.level, self)
-}
-*/
-
-/*
err.Fatal() is true if err's severity level is 0 or 1 (logger.ErrorLevel or logger.Silence)
*/
func (self *Error) Fatal() (fatal bool) {
diff --git a/errs/errors_test.go b/errs/errors_test.go
index 09f70eef5..319093987 100644
--- a/errs/errors_test.go
+++ b/errs/errors_test.go
@@ -28,7 +28,7 @@ func testErrors() *Errors {
func TestErrorMessage(t *testing.T) {
err := testErrors().New(0, "zero detail %v", "available")
message := fmt.Sprintf("%v", err)
- exp := "[TEST] zero: zero detail available"
+ exp := "[TEST] ERROR: zero: zero detail available"
if message != exp {
t.Errorf("error message incorrect. expected %v, got %v", exp, message)
}