mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-30 19:11:39 +00:00
crash: beforeSend needs to add contexts to the event directly
This commit is contained in:
@@ -53,7 +53,7 @@ pub const Value = struct {
|
||||
}
|
||||
|
||||
/// sentry_value_set_by_key_n
|
||||
pub fn setByKey(self: Value, key: []const u8, value: Value) void {
|
||||
pub fn set(self: Value, key: []const u8, value: Value) void {
|
||||
_ = c.sentry_value_set_by_key_n(
|
||||
self.value,
|
||||
key.ptr,
|
||||
@@ -61,4 +61,15 @@ pub const Value = struct {
|
||||
value.value,
|
||||
);
|
||||
}
|
||||
|
||||
/// sentry_value_set_by_key_n
|
||||
pub fn get(self: Value, key: []const u8) ?Value {
|
||||
const val: Value = .{ .value = c.sentry_value_get_by_key_n(
|
||||
self.value,
|
||||
key.ptr,
|
||||
key.len,
|
||||
) };
|
||||
if (val.isNull()) return null;
|
||||
return val;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user