mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 12:35:21 -05:00
rewrite error lib
This commit is contained in:
@@ -4,9 +4,8 @@ import (
|
||||
"bytes"
|
||||
"crypto/cipher"
|
||||
"crypto/md5"
|
||||
"errors"
|
||||
|
||||
"v2ray.com/core/common/crypto"
|
||||
"v2ray.com/core/common/errors"
|
||||
"v2ray.com/core/common/protocol"
|
||||
)
|
||||
|
||||
@@ -41,7 +40,7 @@ func (v *Account) GetCipher() (Cipher, error) {
|
||||
func (v *Account) AsAccount() (protocol.Account, error) {
|
||||
cipher, err := v.GetCipher()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Base(err).Message("Shadowsocks|Account: Failed to get cipher.")
|
||||
}
|
||||
return &ShadowsocksAccount{
|
||||
Cipher: cipher,
|
||||
|
||||
Reference in New Issue
Block a user