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