refactor error messages

This commit is contained in:
Darien Raymond
2017-04-09 01:43:25 +02:00
parent 8175a751db
commit 35248497d2
141 changed files with 710 additions and 481 deletions
+2 -3
View File
@@ -4,7 +4,6 @@ import (
"context"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
)
func CreateInboundHandler(ctx context.Context, config interface{}) (Inbound, error) {
@@ -16,7 +15,7 @@ func CreateInboundHandler(ctx context.Context, config interface{}) (Inbound, err
case Inbound:
return h, nil
default:
return nil, errors.New("Proxy: Not a InboundHandler.")
return nil, newError("Proxy: Not a InboundHandler.")
}
}
@@ -29,6 +28,6 @@ func CreateOutboundHandler(ctx context.Context, config interface{}) (Outbound, e
case Outbound:
return h, nil
default:
return nil, errors.New("Proxy: Not a OutboundHandler.")
return nil, newError("Proxy: Not a OutboundHandler.")
}
}