1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-23 12:02:58 -05:00

simplify error creation

This commit is contained in:
Darien Raymond
2018-09-30 18:39:53 +02:00
parent 00ea6e3cb2
commit d55fbd7f8d
48 changed files with 208 additions and 87 deletions

View File

@@ -2,4 +2,8 @@ package core
import "v2ray.com/core/common/errors"
func newError(values ...interface{}) *errors.Error { return errors.New(values...).Path("Core") }
type errPathObjHolder struct{}
func newError(values ...interface{}) *errors.Error {
return errors.New(values...).WithPathObj(errPathObjHolder{})
}