private static void runFunc(Action func) { try { func(); } catch (Exception e) { Ctrl.errorLogForIO(e); } }
/** 执行response们(主线程) */ private void toRunResponseOne(BaseResponse response) { int mid = response.getDataID(); if (ShineSetting.needShowMessage && !BytesControl.isIgnoreMessage(mid)) { Ctrl.debugLog("收消息:", "mid:" + mid, ShineSetting.needShowMessageDetail ? response.toDataString() : response.getDataClassName()); } _server.checkResponseUnbind(mid); try { response.run(); } catch (Exception e) { Ctrl.errorLogForIO(e); } }