mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Compare commits
2 Commits
359a6b6137
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
255d79bb59 | ||
| fc10c4c576 |
2
.github/workflows/build_docker_image.yml
vendored
2
.github/workflows/build_docker_image.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
2
.github/workflows/rust-clippy.yml
vendored
2
.github/workflows/rust-clippy.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
|
||||
|
||||
@@ -32,7 +32,46 @@ where
|
||||
return;
|
||||
}
|
||||
|
||||
log::error!("{}: {:?}", self.text, error);
|
||||
let backtrace = std::backtrace::Backtrace::force_capture();
|
||||
|
||||
let error_chain = if let Some(std_error) =
|
||||
(&error as &dyn std::any::Any).downcast_ref::<Box<dyn std::error::Error>>()
|
||||
{
|
||||
let mut chain = Vec::new();
|
||||
let mut source = std_error.source();
|
||||
while let Some(err) = source {
|
||||
chain.push(format!(" Caused by: {}", err));
|
||||
source = err.source();
|
||||
}
|
||||
if chain.is_empty() {
|
||||
String::new()
|
||||
} else {
|
||||
format!("\nError chain:\n{}", chain.join("\n"))
|
||||
}
|
||||
} else {
|
||||
String::new()
|
||||
};
|
||||
|
||||
let backtrace_info = match backtrace.status() {
|
||||
std::backtrace::BacktraceStatus::Captured => {
|
||||
format!("\nBacktrace:\n{}", backtrace)
|
||||
}
|
||||
std::backtrace::BacktraceStatus::Disabled => {
|
||||
"\nBacktrace: disabled (compile with debug info for stack traces)".to_string()
|
||||
}
|
||||
std::backtrace::BacktraceStatus::Unsupported => {
|
||||
"\nBacktrace: unsupported on this platform".to_string()
|
||||
}
|
||||
_ => String::new(),
|
||||
};
|
||||
|
||||
log::error!(
|
||||
"{}: {:?}{}{}",
|
||||
self.text,
|
||||
error,
|
||||
error_chain,
|
||||
backtrace_info
|
||||
);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user