Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SentryException value and type nullable #4012

Open
philipphofmann opened this issue May 23, 2024 · 0 comments
Open

Make SentryException value and type nullable #4012

philipphofmann opened this issue May 23, 2024 · 0 comments
Labels
Breaking-change should go in a major release (breaks apps, changes default configs in a major way) Platform: Cocoa
Milestone

Comments

@philipphofmann
Copy link
Member

Description

Only one of SentryException.value or SentryException.type is required to be nonnull; see Relay. The value can already be nil when converting an NSException to a SentryException in the client as NSException.reason is nullable.

SentryEvent *event = [[SentryEvent alloc] initWithLevel:kSentryLevelError];
SentryException *sentryException = [[SentryException alloc] initWithValue:exception.reason
type:exception.name];

Therefore, we should make both value and type nullable readonly and add constructors to ensure either one of the two is set. Consider converting this class to Swift when doing these changes.

@philipphofmann philipphofmann added this to the 9.0.0 milestone May 23, 2024
@philipphofmann philipphofmann moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK May 23, 2024
@philipphofmann philipphofmann added the Breaking-change should go in a major release (breaks apps, changes default configs in a major way) label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking-change should go in a major release (breaks apps, changes default configs in a major way) Platform: Cocoa
Projects
Status: Backlog
Development

No branches or pull requests

1 participant