Skip to content

Add method for track Error#51

Open
markst wants to merge 7 commits intohanabi1224:masterfrom
markst:issue/26
Open

Add method for track Error#51
markst wants to merge 7 commits intohanabi1224:masterfrom
markst:issue/26

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