-
Notifications
You must be signed in to change notification settings - Fork 56
chore: exception web #243
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
base: main
Are you sure you want to change the base?
chore: exception web #243
Conversation
|
still a few things to figure out eg https://posthog.slack.com/archives/C07AA937K9A/p1768489092736519?thread_ts=1768415443.965209&cid=C07AA937K9A |
| true; // Capture isolate errors | ||
|
|
||
| await Posthog().setup(config); | ||
| if (kIsWeb) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
web needs runZonedGuarded and mobile/desktop do not
we have to add docs for this
| } | ||
| } | ||
|
|
||
| // Stack line parser type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ported the code from the JS SDK since i could make it work reusing that part of the JS SDK because the error tracking bits is a plugin downloaded async and its never available when i want to
we can probably ditch this later if i manage to make it working
| /// Captures runZonedGuarded exceptions with optional custom properties | ||
| /// https://api.flutter.dev/flutter/dart-async/runZonedGuarded.html | ||
| /// | ||
| /// [error] - The error/exception to capture | ||
| /// [stackTrace] - Optional stack trace (if not provided, current stack trace will be used) | ||
| /// [properties] - Optional custom properties to attach to the exception event | ||
| Future<void> captureRunZonedGuardedError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ioannisj added this API so they can call this and we dont need to expose PostHogException
💡 Motivation and Context
Closes #237
source code context not possible yet due to flutter/flutter#87734
also flutter/flutter#145111 but less of a blocker since it only is needed for not in app code
💚 How did you test it?
running example on prod

debug builds dont have chunk ids
📝 Checklist