捕获分发消息过程中的所有错误
This commit is contained in:
@@ -32,13 +32,7 @@ public class MsgHandlerDispatcher {
|
|||||||
Method runMethod = clazzHandler.getMethod("run", Cminmsg.class);
|
Method runMethod = clazzHandler.getMethod("run", Cminmsg.class);
|
||||||
HandlerResult result = (HandlerResult) runMethod.invoke(classObject, cminmsg);
|
HandlerResult result = (HandlerResult) runMethod.invoke(classObject, cminmsg);
|
||||||
return result;
|
return result;
|
||||||
} catch (ClassNotFoundException
|
} catch (Exception e) {
|
||||||
| InstantiationException
|
|
||||||
| IllegalAccessException
|
|
||||||
| NoSuchMethodException
|
|
||||||
| SecurityException
|
|
||||||
| IllegalArgumentException
|
|
||||||
| InvocationTargetException e) {
|
|
||||||
//throw new RuntimeException(e);
|
//throw new RuntimeException(e);
|
||||||
logger.error("消息处理失败:{}",e.getMessage());
|
logger.error("消息处理失败:{}",e.getMessage());
|
||||||
return HandlerResult.failure();
|
return HandlerResult.failure();
|
||||||
|
|||||||
Reference in New Issue
Block a user