错误日志修改

This commit is contained in:
2026-08-20 10:16:16 +08:00
parent 276a21c12a
commit e281915fa4
2 changed files with 10 additions and 2 deletions
@@ -72,7 +72,11 @@ public class SysOperationLogAspect {
return result;
} catch (Throwable e) {
entity.setStatusCode(500);
entity.setErrorMsg(truncate(e.getMessage(), 2000));
String msg = e.getMessage();
if (msg == null || msg.trim().isEmpty()) {
msg = e.getClass().getName();
}
entity.setErrorMsg(truncate(msg, 2000));
throw e;
} finally {
entity.setCostTime(System.currentTimeMillis() - start);