iputil 异常处理
This commit is contained in:
parent
f8172b49d6
commit
34a8d7655d
@ -74,6 +74,11 @@ public class IpUtil implements ApplicationRunner {
|
||||
log.error("IP:{} 格式错误:{}. 数据文件状态: {}, 文件信息: {}",
|
||||
ip, errorMsg, dataFileLoaded ? "已加载" : "未加载", dataFileInfo, e);
|
||||
return null;
|
||||
} catch (Throwable t) {
|
||||
// 捕获所有可能的异常,确保不会传播到调用方
|
||||
log.error("IP:{} 解析时发生未知错误. 数据文件状态: {}, 文件信息: {}",
|
||||
ip, dataFileLoaded ? "已加载" : "未加载", dataFileInfo, t);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user