You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/12/29 02:00:12 UTC

[GitHub] wujimin commented on a change in pull request #1046: [SCB-1095]Timer task need catch all throwable to protected from unexpected error

wujimin commented on a change in pull request #1046: [SCB-1095]Timer task need catch all throwable to protected from unexpected error
URL: https://github.com/apache/servicecomb-java-chassis/pull/1046#discussion_r244440885
 
 

 ##########
 File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/event/SimpleSubscriber.java
 ##########
 @@ -70,7 +70,11 @@ public Method getMethod() {
   }
 
   public void dispatchEvent(Object event) {
-    dispatcher.accept(event);
+    try {
+      dispatcher.accept(event);
+    } catch (Throwable e) {
+      LOGGER.error("event process should not throw error. ", e);
 
 Review comment:
   print method too?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services