Commit 24261ecb authored by yanzg's avatar yanzg

表结构修改

parent 8800de17
......@@ -385,6 +385,7 @@ public final class CheckerHelper {
DateAutoHelper.getAutoDate(paramVal);
}
} catch (ParseException e) {
e.printStackTrace();
this.checkResult = language.format(PARAM_NOT_DATE, paramName, formatStr);
this.setValid(false);
}
......
......@@ -99,6 +99,7 @@ public class DateHelper {
}
return initMillSecond(to, initMillSecond);
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(DateHelper.class, ex, from);
}
return null;
......
......@@ -22,6 +22,7 @@ public class EnumHelper {
result = Enum.valueOf(vType, vStr);
}
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(EnumHelper.class, ex, vStr);
}
return result;
......@@ -40,6 +41,7 @@ public class EnumHelper {
result = (T) Enum.valueOf((Class) vType, vStr);
}
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(EnumHelper.class, ex, vStr);
}
if (result == null && vDefault == null) {
......@@ -69,6 +71,7 @@ public class EnumHelper {
}
}
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(EnumHelper.class, ex, i);
}
return result;
......
......@@ -43,6 +43,7 @@ public class RunHelper {
ex = null;
break;
} catch (RuntimeException e) {
e.printStackTrace();
if (i < size) {
// 间隔100ms,防止服务器重启时请求失败
ThreadHelper.sleep(sleep);
......
......@@ -165,6 +165,7 @@ public class Log {
try {
msg = String.format(msg, args);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(Log.class, ex);
}
}
......
......@@ -75,6 +75,7 @@ public class ProcessData {
try {
runProcess.execute(this);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(HttpHelper.class, ex);
}
}
......
......@@ -102,6 +102,7 @@ public class RunPlan {
}
millSeconds = (now - item.getDate());
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(ThreadHelper.class, ex);
}
// 未到执行时间
......@@ -117,6 +118,7 @@ public class RunPlan {
this.triggerEvent(this.onItemExecuted);
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(RunPlan.class, ex);
}
item.initDate();
......
......@@ -142,6 +142,7 @@ public class RunnableListAutoItem implements Comparable<RunnableListAutoItem> {
}
this.code.run();
} catch (Exception ex) {
ex.printStackTrace();
this.handleException(ex);
} finally {
this.count++;
......
......@@ -75,11 +75,13 @@ public class ThreadHelper {
try {
timeout.run(true, -1);
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(ThreadHelper.class, ex);
}
try {
interval.run(false, -1);
} catch (Exception ex) {
ex.printStackTrace();
ExceptionHelper.handleException(ThreadHelper.class, ex);
}
if (timeout.getCount() == 0 && interval.getCount() == 0) {
......
......@@ -61,6 +61,7 @@ public class ThreadNext {
try {
isPause = next.next();
} catch (Exception ex) {
ex.printStackTrace();
boolean isNewEx = frontEx == null || !(frontEx.getClass() == ex.getClass() &&
StringHelper.compare(frontEx.getMessage(), ex.getMessage()));
if (isNewEx || System.currentTimeMillis() - newErrorTime > 5L * 60L * 1000L) {
......
......@@ -120,6 +120,7 @@ public class HttpHelperTest {
try {
String s = HttpHelper.get(req.url);
} catch (Exception ex) {
ex.printStackTrace();
isError = true;
} finally {
long end = System.currentTimeMillis();
......
......@@ -66,8 +66,10 @@ public class YzgFileConsumer implements InitializingBean {
try {
fileService.removeTempFolder(tempFolder);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
fileProcedure.removeTempFolder(tempFolder);
} finally {
......@@ -88,8 +90,10 @@ public class YzgFileConsumer implements InitializingBean {
YzgFileMoveReqVo req = JsonHelper.deserialize(json, YzgFileMoveReqVo.class);
fileService.moveFile(req);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
fileProcedure.moveFile(json, 60 * 1000);
} finally {
......@@ -125,8 +129,10 @@ public class YzgFileConsumer implements InitializingBean {
fileProcedure.convertImage(req);
}
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
fileProcedure.convertImage(json, 60 * 1000);
} finally {
......@@ -162,8 +168,10 @@ public class YzgFileConsumer implements InitializingBean {
fileProcedure.convertVideo(req);
}
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
fileProcedure.convertVideo(json, 60 * 1000);
} finally {
......@@ -188,8 +196,10 @@ public class YzgFileConsumer implements InitializingBean {
}
excelService.fileCreate(json, fileReq);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
fileProcedure.fileCreateDelay(json);
} finally {
......@@ -213,8 +223,10 @@ public class YzgFileConsumer implements InitializingBean {
}
excelService.updateStatus(fileReq);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgFileConsumer.class, ex);
fileProcedure.fileStatus(json);
} finally {
......
......@@ -68,6 +68,7 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
System.out.println("丢失消息:" + ack + " msg:" + cause);
}
} catch (Exception ex) {
ex.printStackTrace();
Log.error(MqConfigurable.class, ex);
}
}
......@@ -93,6 +94,7 @@ public class MqConfigurable implements RabbitTemplate.ConfirmCallback, RabbitTem
// 写入数据库
messageSendService.onError(messageVo);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(MqConfigurable.class, ex);
}
}
......
......@@ -49,8 +49,10 @@ public class YzgMqConsumer {
req = JsonHelper.deserialize(json, MessageVo.class);
yzgMqProcedure.send(req, true);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgMqConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgMqConsumer.class, ex);
// 等待100ms再次执行
yzgMqProcedure.sendDelay(req, 100);
......@@ -74,8 +76,10 @@ public class YzgMqConsumer {
req = JsonHelper.deserialize(json, MessagePlan.class);
yzgMqProcedure.sendDelay(req);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgMqConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgMqConsumer.class, ex);
// 等待100ms再次执行
yzgMqProcedure.sendDelay(req, 100);
......@@ -97,8 +101,10 @@ public class YzgMqConsumer {
RegisterServerTokenReqVo req = JsonHelper.deserialize(json, RegisterServerTokenReqVo.class);
messageServerService.removeServerToken(req);
} catch (CodeException ex) {
ex.printStackTrace();
Log.error(YzgMqConsumer.class, ex);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(YzgMqConsumer.class, ex);
// 等待100ms再次执行
yzgMqProcedure.sendRemove(json, 100);
......
......@@ -149,6 +149,7 @@ public class MessageSendServiceImpl implements MessageSendService {
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
}
} catch (IOException e) {
e.printStackTrace();
Log.error(MessageSendServiceImpl.class, e);
}
}
......
......@@ -192,6 +192,7 @@ public class MessageServeServiceImpl implements MessageServerService, Initializi
});
sendServerMessage(msg);
} catch (Exception ex) {
ex.printStackTrace();
Log.error(MqServiceImpl.class, ex);
} finally {
messageSendService.basicAck(message, channel);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment