1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 04:25:44 -05:00

meaningful error message

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

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