Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/firebase_crashlytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.0.4+3

* Migrate our handling of `FlutterErrorDetails` to work on both Flutter stable
and master.

## 0.0.4+2

* Keep debug log formatting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ class Crashlytics {
// ignore: strong_mode_implicit_dynamic_method
await channel.invokeMethod('Crashlytics#onError', <String, dynamic>{
'exception': details.exceptionAsString(),
'context': details.context,
// FlutterErrorDetails.context has been migrated from a String to a
// DiagnosticsNode. Coerce it to a String here in a way that will work
// on both Strings and the new DiagnosticsNode values. See https://groups.google.com/forum/#!topic/flutter-announce/hp1RNIgej38
'context': '${details.context}',
'stackTraceElements': stackTraceElements,
'logs': _logs.toList(),
'keys': _prepareKeys(),
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_crashlytics/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: firebase_crashlytics
description: Flutter plugin for Firebase Crashlytics. It reports uncaught errors to the
Firebase console.
version: 0.0.4+2
version: 0.0.4+3
author: Flutter Team <flutter-dev@google.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_crashlytics

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';

Expand Down Expand Up @@ -32,10 +34,7 @@ void main() {
exception: 'foo exception',
stack: StackTrace.current,
library: 'foo library',
context: 'foo context',
informationCollector: (StringBuffer information) {
Copy link

Choose a reason for hiding this comment

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

strange the test still passes with these lines removed.

information.writeln('foo information');
},
context: ErrorDescription('foo context'),
);
crashlytics.enableInDevMode = true;
crashlytics.log('foo');
Expand Down