1
0
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:
Darien Raymond
2016-12-04 09:10:47 +01:00
parent a4019a6900
commit efb24a4d21
65 changed files with 251 additions and 132 deletions

View File

@@ -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,