Skip to content

Catch and log all exceptions#68

Merged
haacked merged 1 commit intomainfrom
haacked/improved-exception-logging
Mar 24, 2025
Merged

Catch and log all exceptions#68
haacked merged 1 commit intomainfrom
haacked/improved-exception-logging

Conversation

@haacked
Copy link
Collaborator

@haacked haacked commented Mar 24, 2025

And just debug assert that they're not "coding error" exceptions.

We don't want to miss out on exception logging in our async batching that could cause the process to crash without good info.

And bump version to 1.0.4.

And just debug assert that they're not "coding error" exceptions.

We don't want to miss out on exception logging in our async batching that could cause the process to crash without good info.
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Enhanced exception handling in AsyncBatchHandler to catch and log all unexpected exceptions while maintaining debug assertions for coding errors, along with version bump to 1.0.4.

  • Added general exception handling in src/PostHog/Library/AsyncBatchHandler.cs with Debug.Assert checks for ArgumentException and NullReferenceException
  • Improved logging for unexpected exceptions in HandleFlushSignal, HandleTimer, and DisposeAsync methods
  • Removed duplicate Nullable property declaration in Directory.Build.props
  • Updated version from 1.0.3 to 1.0.4 across configuration files

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@haacked haacked merged commit 6681233 into main Mar 24, 2025
4 checks passed
@haacked haacked deleted the haacked/improved-exception-logging branch March 24, 2025 21:58
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.

1 participant