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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user