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 shadowsocks
import (
"encoding/json"
"errors"
"strings"
"github.com/v2ray/v2ray-core/common/log"
@@ -21,7 +22,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
}
jsonConfig := new(JsonConfig)
if err := json.Unmarshal(data, jsonConfig); err != nil {
return err
return errors.New("Shadowsocks: Failed to parse config: " + err.Error())
}
this.UDP = jsonConfig.UDP