mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
meaningful error message
This commit is contained in:
1 parent
d9b59133cc
commit
09f7e8b61e
9 files changed
+30
-22
No files matched your search
@@ -4,6 +4,7 @@ package socks
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
"github.com/v2ray/v2ray-core/common/log"
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
@@ -30,7 +31,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
|
||||
rawConfig := new(SocksConfig)
|
||||
if err := json.Unmarshal(data, rawConfig); err != nil {
|
||||
return err
|
||||
return errors.New("Socks: Failed to parse config: " + err.Error())
|
||||
}
|
||||
if rawConfig.AuthMethod == AuthMethodNoAuth {
|
||||
this.AuthType = AuthTypeNoAuth
|
||||
|
||||
Reference in new issue
Block a user