mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-25 07:20:44 +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 dokodemo
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
|
||||
v2net "github.com/v2ray/v2ray-core/common/net"
|
||||
"github.com/v2ray/v2ray-core/proxy/internal"
|
||||
@@ -18,7 +19,7 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
rawConfig := new(DokodemoConfig)
|
||||
if err := json.Unmarshal(data, rawConfig); err != nil {
|
||||
return err
|
||||
return errors.New("Dokodemo: Failed to parse config: " + err.Error())
|
||||
}
|
||||
this.Address = rawConfig.Host.Address
|
||||
this.Port = rawConfig.PortValue
|
||||
|
||||
Reference in new issue
Block a user