aboutsummaryrefslogtreecommitdiffstats
path: root/errs/errors.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-01-06 23:55:03 +0800
committerFelix Lange <fjl@twurst.com>2017-01-07 01:18:07 +0800
commit13e3b2f433c48fe81423c1a13e9a5194ece61b01 (patch)
tree19ff7c32597a41bbfe7ccc0d32ecaed05d0e6132 /errs/errors.go
parentf2da6581ba827a2aab091f764ace8017b26450d8 (diff)
downloadgo-tangerine-13e3b2f433c48fe81423c1a13e9a5194ece61b01.tar.gz
go-tangerine-13e3b2f433c48fe81423c1a13e9a5194ece61b01.tar.zst
go-tangerine-13e3b2f433c48fe81423c1a13e9a5194ece61b01.zip
logger, pow/dagger, pow/ezp: delete dead code
Diffstat (limited to 'errs/errors.go')
-rw-r--r--errs/errors.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/errs/errors.go b/errs/errors.go
index 675649efa..daa814db7 100644
--- a/errs/errors.go
+++ b/errs/errors.go
@@ -19,7 +19,6 @@ package errs
import (
"fmt"
- "github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
)
@@ -32,15 +31,10 @@ Fields:
Package:
name of the package/component
-
- Level:
- a function mapping error code to logger.LogLevel (severity)
- if not given, errors default to logger.InfoLevel
*/
type Errors struct {
Errors map[int]string
Package string
- Level func(code int) logger.LogLevel
}
/*
@@ -58,7 +52,6 @@ type Error struct {
Code int
Name string
Package string
- level logger.LogLevel
message string
format string
params []interface{}
@@ -69,15 +62,10 @@ func (self *Errors) New(code int, format string, params ...interface{}) *Error {
if !ok {
panic("invalid error code")
}
- level := logger.InfoLevel
- if self.Level != nil {
- level = self.Level(code)
- }
return &Error{
Code: code,
Name: name,
Package: self.Package,
- level: level,
format: format,
params: params,
}
@@ -98,13 +86,3 @@ func (self Error) Log(v glog.Verbose) {
v.Infoln(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) {
- if self.level < logger.WarnLevel {
- fatal = true
- }
- return
-}