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

Add method for track Error #51

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

markst
Copy link

@markst markst commented Feb 22, 2022

Still needs work.

Opening for discussion.

#26

await _methodChannel.invokeMethod('trackError', <String, dynamic>{
'message': message,
'properties': properties,
// Support `ErrorAttachmentLog`?
Copy link
Author

Choose a reason for hiding this comment

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

do we think support ErrorAttachmentLog is necessary?

Copy link
Author

Choose a reason for hiding this comment

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

Wonder if it might be relevant to support passing stack trace from Dart?

runZonedGuarded<Future<void>>(() async {
  runApp(App());
}, (error, stackTrace) => AppCenter.trackErrorAsync(error, stackTrace));

"trackError" -> {
val message = call.argument<String>("message")
val properties = call.argument<Map<String, String>>("properties")
Crashes.trackError(Exception(message), properties, null)
Copy link
Author

Choose a reason for hiding this comment

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

wonder if Flutter stack could be passed somehow?

throwable.setStackTrace(new StackTraceElement[]{

Copy link
Author

Choose a reason for hiding this comment

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

      final Trace trace = Trace.parseVM(stack.toString()).terse;
      final List<Map<String, String>> elements = <Map<String, String>>[];

@markst markst mentioned this pull request May 6, 2022
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