Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
27dc043a
Commit
27dc043a
authored
Feb 07, 2017
by
Devon Carew
Committed by
GitHub
Feb 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade to the latest usage package (#7917)
parent
06f879b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
15 deletions
+3
-15
usage.dart
packages/flutter_tools/lib/src/usage.dart
+2
-14
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+1
-1
No files found.
packages/flutter_tools/lib/src/usage.dart
View file @
27dc043a
...
...
@@ -4,8 +4,7 @@
import
'dart:async'
;
import
'package:usage/src/usage_impl_io.dart'
;
// ignore: implementation_imports
import
'package:usage/usage.dart'
;
import
'package:usage/usage_io.dart'
;
import
'base/context.dart'
;
import
'base/utils.dart'
;
...
...
@@ -85,18 +84,7 @@ class Usage {
void
sendException
(
dynamic
exception
,
StackTrace
trace
)
{
if
(!
suppressAnalytics
)
_analytics
.
sendException
(
_shorten
(
'
${exception.runtimeType}
;
${sanitizeStacktrace(trace)}
'
));
}
/// Shorten the exception information that is sent to Google Analytics
/// to get more information because Google Analytics truncates this to 100 char.
String
_shorten
(
String
text
)
{
/// TODO(danrubel) Gather more information about https://github.com/flutter/flutter/issues/5137
/// remove this code once that issue is resolved.
const
String
prefix
=
'FileSystemException; dart:io/file_impl.dart 807 _RandomAccessFile.writeFromSync dart:io/stdio.dart '
;
if
(
text
.
startsWith
(
prefix
))
text
=
'FSE:807 '
+
text
.
substring
(
prefix
.
length
);
return
text
;
_analytics
.
sendException
(
'
${exception.runtimeType}
\n
${sanitizeStacktrace(trace)}
'
);
}
/// Fires whenever analytics data is sent over the network; public for testing.
...
...
packages/flutter_tools/pubspec.yaml
View file @
27dc043a
...
...
@@ -26,7 +26,7 @@ dependencies:
process
:
1.0.1
pub_semver
:
^1.0.0
stack_trace
:
^1.4.0
usage
:
^
2.2.1
usage
:
^
3.0.0
vm_service_client
:
'
0.2.2+4'
web_socket_channel
:
^1.0.4
xml
:
^2.4.1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment