From 507da1a4519b5aa68074be07d7a84178dd781055 Mon Sep 17 00:00:00 2001
From: V2Ray <admin@v2ray.com>
Date: Sun, 4 Oct 2015 16:53:37 +0200
Subject: [PATCH] handle error when load point config

---
 config/json/json.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/config/json/json.go b/config/json/json.go
index 5a8f3cbf..725168b3 100644
--- a/config/json/json.go
+++ b/config/json/json.go
@@ -59,6 +59,10 @@ func LoadConfig(file string) (*Config, error) {
 
 	config := &Config{}
 	err = json.Unmarshal(rawConfig, config)
+	if err != nil {
+		log.Error("Failed to load point config: %v", err)
+		return nil, err
+	}
 
 	if !filepath.IsAbs(config.InboundConfigValue.File) && len(config.InboundConfigValue.File) > 0 {
 		config.InboundConfigValue.File = filepath.Join(filepath.Dir(fixedFile), config.InboundConfigValue.File)