Skip to content

Conversation

marandaneto
Copy link
Member

💡 Motivation and Context

part of PostHog/posthog#38845

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto
Copy link
Member Author

@ioannisj early feedback is welcomed here, the feat works already

Comment on lines +104 to +105
// value is required, using an empty placeholder
exception["value"] = theThrowable.message ?: ""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will undo once PostHog/posthog#39571 lands

Comment on lines +120 to +126
if (event.isFatalExceptionEvent()) {
executor.submitSyncSafely {
flushEventSync(event, true)
}
} else {
executor.executeSafely {
flushEventSync(event)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if its fatal, flush it sync otherwise async

Comment on lines +20 to +23
internal constructor(config: PostHogConfig, adapterExceptionHandler: UncaughtExceptionHandlerAdapter) {
this.config = config
this.adapterExceptionHandler = adapterExceptionHandler
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2nd ctor to make it testable, tests WIP

@ioannisj
Copy link
Contributor

@ioannisj early feedback is welcomed here, the feat works already

Sure. Will do as soon as I'm back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants