meaningful error message

This commit is contained in:
v2ray committed 2016-06-11 22:52:37 +02:00
1 parent d9b59133cc
commit 09f7e8b61e
9 files changed
+30 -22

No files matched your search

+2 -1
View File
@@ -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