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
cb6bfe39
Commit
cb6bfe39
authored
Dec 06, 2016
by
Dan Rubel
Committed by
GitHub
Dec 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten exception info sent to analytics (#7169)
parent
552edb43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
usage.dart
packages/flutter_tools/lib/src/usage.dart
+12
-1
No files found.
packages/flutter_tools/lib/src/usage.dart
View file @
cb6bfe39
...
...
@@ -85,7 +85,18 @@ class Usage {
void
sendException
(
dynamic
exception
,
StackTrace
trace
)
{
if
(!
suppressAnalytics
)
_analytics
.
sendException
(
'
${exception.runtimeType}
;
${sanitizeStacktrace(trace)}
'
);
_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
;
}
/// Fires whenever analytics data is sent over the network; public for testing.
...
...
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