Remove Chain terse parsing (#36860)
This commit is contained in:
@@ -115,6 +115,7 @@ Future<int> _handleToolError(
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
getFlutterVersion: getFlutterVersion,
|
||||
command: args.join(' '),
|
||||
);
|
||||
|
||||
if (error is String)
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'dart:async';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:stack_trace/stack_trace.dart';
|
||||
|
||||
import '../base/io.dart';
|
||||
import '../base/os.dart';
|
||||
@@ -85,6 +84,7 @@ class CrashReportSender {
|
||||
@required dynamic error,
|
||||
@required StackTrace stackTrace,
|
||||
@required String getFlutterVersion(),
|
||||
@required String command,
|
||||
}) async {
|
||||
try {
|
||||
final String flutterVersion = getFlutterVersion();
|
||||
@@ -112,11 +112,11 @@ class CrashReportSender {
|
||||
req.fields['type'] = _kDartTypeId;
|
||||
req.fields['error_runtime_type'] = '${error.runtimeType}';
|
||||
req.fields['error_message'] = '$error';
|
||||
req.fields['comments'] = command;
|
||||
|
||||
final String stackTraceWithRelativePaths = Chain.parse(stackTrace.toString()).terse.toString();
|
||||
req.files.add(http.MultipartFile.fromString(
|
||||
_kStackTraceFileField,
|
||||
stackTraceWithRelativePaths,
|
||||
stackTrace.toString(),
|
||||
filename: _kStackTraceFilename,
|
||||
));
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ Future<void> verifyCrashReportSent(RequestInfo crashInfo) async {
|
||||
expect(crashInfo.fields['type'], 'DartError');
|
||||
expect(crashInfo.fields['error_runtime_type'], 'StateError');
|
||||
expect(crashInfo.fields['error_message'], 'Bad state: Test bad state error');
|
||||
expect(crashInfo.fields['comments'], 'crash');
|
||||
|
||||
final BufferLogger logger = context.get<Logger>();
|
||||
expect(logger.statusText, 'Sending crash report to Google.\n'
|
||||
|
||||
Reference in New Issue
Block a user