Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion apps/desktop/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
sentry::ClientOptions {
release: sentry::release_name!(),
debug: cfg!(debug_assertions),
// Disable backtrace capture to prevent secondary panics during backtrace collection
// on Windows, which can cause "panic in a function that cannot unwind" errors
attach_stacktrace: false,
before_send: Some(Arc::new(|mut event| {
// this is irrelevant to us + users probably don't want us knowing their computer names
event.server_name = None;
Expand All @@ -42,7 +45,14 @@
));

// Caution! Everything before here runs in both app and crash reporter processes
let _guard = tauri_plugin_sentry::minidump::init(&sentry_client);
// Wrap minidump initialization in catch_unwind to prevent panics from propagating
let _guard = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
tauri_plugin_sentry::minidump::init(&sentry_client)
}))
.unwrap_or_else(|e| {
eprintln!("Failed to initialize Sentry minidump handler: {:?}", e);
None

Check failure on line 54 in apps/desktop/src-tauri/src/main.rs

View workflow job for this annotation

GitHub Actions / Clippy (aarch64-apple-darwin, macos-latest)

mismatched types

error[E0308]: mismatched types --> apps/desktop/src-tauri/src/main.rs:54:13 | 54 | None | ^^^^ expected `Result<Handle, Error>`, found `Option<_>` | = note: expected enum `std::result::Result<tauri_plugin_sentry::sentry_rust_minidump::Handle, minidumper_child::Error>` found enum `std::option::Option<_>`
});

(sentry_client, _guard)
});
Expand Down
Loading