Skip to content

Commit

Permalink
fix: 移除不必要的anyhow backtrace feature并更新错误处理以输出backtrace信息
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow3aaa committed Nov 17, 2024
1 parent dc78ac7 commit db794f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 67 deletions.
67 changes: 2 additions & 65 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repository = "https://github.com/shadow3aaa/fas-rs"
likely_stable = "0.1.2"
parking_lot = "0.12.3"
log = "0.4.22"
anyhow = { version = "1.0.93", features = ["backtrace"] }
anyhow = { version = "1.0.93" }
thiserror = "2.0.3"
inotify = { version = "0.11.0", default-features = false }
libc = "0.2.162"
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ fn main() -> Result<()> {
return Ok(());
} else if args[1] == "run" {
setprop("fas-rs-server-started", "true");
run(&args[2]).unwrap_or_else(|e| error!("{e:#?}"));
run(&args[2]).unwrap_or_else(|e| {
error!("{e:#?}");
error!("{:#?}", e.backtrace());
});
}

Ok(())
Expand Down

0 comments on commit db794f2

Please sign in to comment.