Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-oss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-oss
Commits
e1a3082a
Commit
e1a3082a
authored
Mar 13, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
6f5bb9b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
yd-oss-service/src/main/java/com/yd/oss/service/service/impl/AliYunOssServiceImpl.java
+9
-2
No files found.
yd-oss-service/src/main/java/com/yd/oss/service/service/impl/AliYunOssServiceImpl.java
View file @
e1a3082a
...
@@ -602,8 +602,15 @@ public class AliYunOssServiceImpl implements OssService {
...
@@ -602,8 +602,15 @@ public class AliYunOssServiceImpl implements OssService {
log
.
info
(
"已切换到OSS提供商: {}"
,
provider
.
getName
());
log
.
info
(
"已切换到OSS提供商: {}"
,
provider
.
getName
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"切换OSS提供商失败"
,
e
);
// 打印完整堆栈
// 安全打印,避免 Logback 处理
throw
new
RuntimeException
(
"切换OSS提供商失败"
,
e
);
// 保留原始异常
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
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment