Volcannozzz commented on pull request #2154:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/2154#issuecomment-773099927


   I think the handler example given by @liubao68  cannot meet @liuguangrong 's 
needs. Because the transportHandler is the last handler in the source code.
   
   ```java
   public class ConsumerHandlerManager extends AbstractHandlerManager {
     @Override
     protected String getName() {
       return "Consumer";
     }
   
     @Override
     protected String getInnerDefaultChainDef() {
       return "simpleLB";
     }
   
     @Override
     protected Handler getLastHandler() {
       return TransportClientHandler.INSTANCE;
     }
   }
   ```
   and in `AbstractHandlerManager.java`
   
   ```java
     private List<Handler> createHandlerChain(String chainDef) {
       List<Class<Handler>> chainClasses = convertToChainClass(chainDef);
   
       List<Handler> handlerList = new ArrayList<>();
       for (Class<Handler> cls : chainClasses) {
         try {
           handlerList.add(cls.newInstance());
         } catch (Exception e) {
           // 在启动阶段直接抛异常出来
           throw new Error(e);
         }
       }
       handlerList.add(getLastHandler());
       return handlerList;
     }
   ```
   In addition, when the transportHandler calls an exception, it will return 
the exception information to the caller. Can the exception information be 
handled by the caller? Hope you provide the calling way and error message stack.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to