Commit e1a3082a by zhangxingmin

push

parent 6f5bb9b8
......@@ -602,8 +602,15 @@ public class AliYunOssServiceImpl implements OssService {
log.info("已切换到OSS提供商: {}", provider.getName());
} catch (Exception e) {
log.error("切换OSS提供商失败", e); // 打印完整堆栈
throw new RuntimeException("切换OSS提供商失败", e); // 保留原始异常
// 安全打印,避免 Logback 处理
System.err.println("捕获到异常: " + e.getClass().getName() + " - " + e.getMessage());
e.printStackTrace(System.err); // 如果这也 StackOverflow,说明异常对象本身有问题
// 如果上面依然 StackOverflow,则只打印类名和消息
// System.err.println("异常类: " + e.getClass().getName());
// 然后可以尝试抛出异常(注意不要再次记录日志)
throw new RuntimeException("切换OSS提供商失败", e);
}
}
......
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