mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
Disable crash report in debug
Crashing when developing is more noise than signal
This commit is contained in:
@@ -2,6 +2,8 @@ const std = @import("std");
|
|||||||
const lp = @import("lightpanda");
|
const lp = @import("lightpanda");
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
|
|
||||||
|
const IS_DEBUG = builtin.mode == .Debug;
|
||||||
|
|
||||||
const abort = std.posix.abort;
|
const abort = std.posix.abort;
|
||||||
|
|
||||||
// tracks how deep within a panic we're panicling
|
// tracks how deep within a panic we're panicling
|
||||||
@@ -70,6 +72,10 @@ pub noinline fn crash(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn report(reason: []const u8, begin_addr: usize) !void {
|
fn report(reason: []const u8, begin_addr: usize) !void {
|
||||||
|
if (comptime IS_DEBUG) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (@import("telemetry/telemetry.zig").isDisabled()) {
|
if (@import("telemetry/telemetry.zig").isDisabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user