1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-11 08:15:27 -04:00

refactor error interface

This commit is contained in:
Darien Raymond
2017-04-06 15:13:09 +02:00
parent 65c6972eb5
commit fc31f9b94c
40 changed files with 272 additions and 249 deletions

View File

@@ -41,7 +41,7 @@ func (v *Account) GetCipher() (Cipher, error) {
func (v *Account) AsAccount() (protocol.Account, error) {
cipher, err := v.GetCipher()
if err != nil {
return nil, errors.Base(err).Message("Shadowsocks|Account: Failed to get cipher.")
return nil, errors.New("failed to get cipher").Base(err).Path("Shadowsocks", "Account")
}
return &ShadowsocksAccount{
Cipher: cipher,