Commit 22a205e8fc77feb02d70b01329886c6dc9261516

Authored by 648540858
1 parent c3ce2bc5

优化异常处理

src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
... ... @@ -520,7 +520,7 @@ public class StreamInfo implements Serializable, Cloneable{
520 520 try{
521 521 instance = (StreamInfo)super.clone();
522 522 }catch(CloneNotSupportedException e) {
523   - logger.error("未处理的异常 ", e);
  523 + e.printStackTrace();
524 524 }
525 525 return instance;
526 526 }
... ...
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/SubscribeRequestProcessor.java
1 1 package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl;
2 2  
3   -import com.genersoft.iot.vmp.common.VideoManagerConstants;
4   -import com.genersoft.iot.vmp.conf.DynamicTask;
5   -import com.genersoft.iot.vmp.conf.UserSetting;
6 3 import com.genersoft.iot.vmp.gb28181.bean.CmdType;
7 4 import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
8 5 import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder;
9 6 import com.genersoft.iot.vmp.gb28181.bean.SubscribeInfo;
10   -import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeHandlerTask;
11 7 import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver;
12 8 import com.genersoft.iot.vmp.gb28181.transmit.SIPSender;
13   -import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
14   -import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
15 9 import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor;
16 10 import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent;
17 11 import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
18 12 import com.genersoft.iot.vmp.gb28181.utils.XmlUtil;
19   -import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
20 13 import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
21   -import gov.nist.javax.sip.SipProviderImpl;
22 14 import gov.nist.javax.sip.message.SIPRequest;
23 15 import gov.nist.javax.sip.message.SIPResponse;
24 16 import org.dom4j.DocumentException;
... ... @@ -29,7 +21,9 @@ import org.springframework.beans.factory.InitializingBean;
29 21 import org.springframework.beans.factory.annotation.Autowired;
30 22 import org.springframework.stereotype.Component;
31 23  
32   -import javax.sip.*;
  24 +import javax.sip.InvalidArgumentException;
  25 +import javax.sip.RequestEvent;
  26 +import javax.sip.SipException;
33 27 import javax.sip.header.ExpiresHeader;
34 28 import javax.sip.message.Response;
35 29 import java.text.ParseException;
... ...
src/main/java/com/genersoft/iot/vmp/utils/redis/RedisUtil.java
... ... @@ -38,7 +38,7 @@ public class RedisUtil {
38 38 }
39 39 return true;
40 40 } catch (Exception e) {
41   - logger.error("未处理的异常 ", e);
  41 + e.printStackTrace();
42 42 return false;
43 43 }
44 44 }
... ... @@ -66,7 +66,7 @@ public class RedisUtil {
66 66 try {
67 67 return redisTemplate.hasKey(key);
68 68 } catch (Exception e) {
69   - logger.error("未处理的异常 ", e);
  69 + e.printStackTrace();
70 70 return false;
71 71 }
72 72 }
... ... @@ -91,7 +91,7 @@ public class RedisUtil {
91 91 }
92 92 return true;
93 93 } catch (Exception e) {
94   - logger.error("未处理的异常 ", e);
  94 + e.printStackTrace();
95 95 return false;
96 96 }
97 97 }
... ... @@ -124,7 +124,7 @@ public class RedisUtil {
124 124 redisTemplate.opsForValue().set(key, value);
125 125 return true;
126 126 } catch (Exception e) {
127   - logger.error("未处理的异常 ", e);
  127 + e.printStackTrace();
128 128 return false;
129 129 }
130 130 }
... ... @@ -148,7 +148,7 @@ public class RedisUtil {
148 148 }
149 149 return true;
150 150 } catch (Exception e) {
151   - logger.error("未处理的异常 ", e);
  151 + e.printStackTrace();
152 152 return false;
153 153 }
154 154 }
... ... @@ -226,7 +226,7 @@ public class RedisUtil {
226 226 redisTemplate.opsForHash().putAll(key, map);
227 227 return true;
228 228 } catch (Exception e) {
229   - logger.error("未处理的异常 ", e);
  229 + e.printStackTrace();
230 230 return false;
231 231 }
232 232 }
... ... @@ -249,7 +249,7 @@ public class RedisUtil {
249 249 }
250 250 return true;
251 251 } catch (Exception e) {
252   - logger.error("未处理的异常 ", e);
  252 + e.printStackTrace();
253 253 return false;
254 254 }
255 255 }
... ... @@ -269,7 +269,7 @@ public class RedisUtil {
269 269 redisTemplate.opsForHash().put(key, item, value);
270 270 return true;
271 271 } catch (Exception e) {
272   - logger.error("未处理的异常 ", e);
  272 + e.printStackTrace();
273 273 return false;
274 274 }
275 275 }
... ... @@ -293,7 +293,7 @@ public class RedisUtil {
293 293 }
294 294 return true;
295 295 } catch (Exception e) {
296   - logger.error("未处理的异常 ", e);
  296 + e.printStackTrace();
297 297 return false;
298 298 }
299 299 }
... ... @@ -365,7 +365,7 @@ public class RedisUtil {
365 365 try {
366 366 return redisTemplate.opsForSet().members(key);
367 367 } catch (Exception e) {
368   - logger.error("未处理的异常 ", e);
  368 + e.printStackTrace();
369 369 return null;
370 370 }
371 371 }
... ... @@ -383,7 +383,7 @@ public class RedisUtil {
383 383 try {
384 384 return redisTemplate.opsForSet().isMember(key, value);
385 385 } catch (Exception e) {
386   - logger.error("未处理的异常 ", e);
  386 + e.printStackTrace();
387 387 return false;
388 388 }
389 389 }
... ... @@ -401,7 +401,7 @@ public class RedisUtil {
401 401 try {
402 402 return redisTemplate.opsForSet().add(key, values);
403 403 } catch (Exception e) {
404   - logger.error("未处理的异常 ", e);
  404 + e.printStackTrace();
405 405 return 0;
406 406 }
407 407 }
... ... @@ -424,7 +424,7 @@ public class RedisUtil {
424 424 }
425 425 return count;
426 426 } catch (Exception e) {
427   - logger.error("未处理的异常 ", e);
  427 + e.printStackTrace();
428 428 return 0;
429 429 }
430 430 }
... ... @@ -441,7 +441,7 @@ public class RedisUtil {
441 441 try {
442 442 return redisTemplate.opsForSet().size(key);
443 443 } catch (Exception e) {
444   - logger.error("未处理的异常 ", e);
  444 + e.printStackTrace();
445 445 return 0;
446 446 }
447 447 }
... ... @@ -459,7 +459,7 @@ public class RedisUtil {
459 459 try {
460 460 return redisTemplate.opsForSet().remove(key, values);
461 461 } catch (Exception e) {
462   - logger.error("未处理的异常 ", e);
  462 + e.printStackTrace();
463 463 return 0;
464 464 }
465 465 }
... ... @@ -625,7 +625,7 @@ public class RedisUtil {
625 625 try {
626 626 return redisTemplate.opsForList().range(key, start, end);
627 627 } catch (Exception e) {
628   - logger.error("未处理的异常 ", e);
  628 + e.printStackTrace();
629 629 return null;
630 630 }
631 631 }
... ... @@ -642,7 +642,7 @@ public class RedisUtil {
642 642 try {
643 643 return redisTemplate.opsForList().size(key);
644 644 } catch (Exception e) {
645   - logger.error("未处理的异常 ", e);
  645 + e.printStackTrace();
646 646 return 0;
647 647 }
648 648 }
... ... @@ -662,7 +662,7 @@ public class RedisUtil {
662 662 try {
663 663 return redisTemplate.opsForList().index(key, index);
664 664 } catch (Exception e) {
665   - logger.error("未处理的异常 ", e);
  665 + e.printStackTrace();
666 666 return null;
667 667 }
668 668 }
... ... @@ -681,7 +681,7 @@ public class RedisUtil {
681 681 redisTemplate.opsForList().rightPush(key, value);
682 682 return true;
683 683 } catch (Exception e) {
684   - logger.error("未处理的异常 ", e);
  684 + e.printStackTrace();
685 685 return false;
686 686 }
687 687 }
... ... @@ -704,7 +704,7 @@ public class RedisUtil {
704 704 }
705 705 return true;
706 706 } catch (Exception e) {
707   - logger.error("未处理的异常 ", e);
  707 + e.printStackTrace();
708 708 return false;
709 709 }
710 710 }
... ... @@ -723,7 +723,7 @@ public class RedisUtil {
723 723 redisTemplate.opsForList().rightPushAll(key, values);
724 724 return true;
725 725 } catch (Exception e) {
726   - logger.error("未处理的异常 ", e);
  726 + e.printStackTrace();
727 727 return false;
728 728 }
729 729 }
... ... @@ -746,7 +746,7 @@ public class RedisUtil {
746 746 }
747 747 return true;
748 748 } catch (Exception e) {
749   - logger.error("未处理的异常 ", e);
  749 + e.printStackTrace();
750 750 return false;
751 751 }
752 752 }
... ... @@ -766,7 +766,7 @@ public class RedisUtil {
766 766 redisTemplate.opsForList().set(key, index, value);
767 767 return true;
768 768 } catch (Exception e) {
769   - logger.error("未处理的异常 ", e);
  769 + e.printStackTrace();
770 770 return false;
771 771 }
772 772 }
... ... @@ -787,7 +787,7 @@ public class RedisUtil {
787 787 try {
788 788 return redisTemplate.opsForList().remove(key, count, value);
789 789 } catch (Exception e) {
790   - logger.error("未处理的异常 ", e);
  790 + e.printStackTrace();
791 791 return 0;
792 792 }
793 793 }
... ... @@ -829,7 +829,7 @@ public class RedisUtil {
829 829 Set<String> set = redisTemplate.keys(key);
830 830 return new ArrayList<>(set);
831 831 } catch (Exception e) {
832   - logger.error("未处理的异常 ", e);
  832 + e.printStackTrace();
833 833 return null;
834 834 }
835 835 }
... ... @@ -854,7 +854,7 @@ public class RedisUtil {
854 854 // //关闭cursor
855 855 // cursor.close();
856 856 // } catch (Exception e) {
857   -// logger.error("未处理的异常 ", e);
  857 +// e.printStackTrace();
858 858 // }
859 859 // return result;
860 860 // }
... ...
web_src/src/components/dialog/platformEdit.vue
... ... @@ -331,7 +331,7 @@ export default {
331 331 return result;
332 332 },
333 333 checkExpires: function() {
334   - if (this.platform.enable && this.platform.expires == "0") {
  334 + if (this.platform.enable && this.platform.expires === "0") {
335 335 this.platform.expires = "300";
336 336 }
337 337 },
... ...