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
a48446f9
Unverified
Commit
a48446f9
authored
Jul 24, 2020
by
Todd Volkert
Committed by
GitHub
Jul 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error handling for errors with empty stack traces (#62224)
Fixes
https://github.com/flutter/flutter/issues/62223
parent
6e252772
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
stack_frame.dart
packages/flutter/lib/src/foundation/stack_frame.dart
+1
-0
error_reporting_test.dart
packages/flutter/test/foundation/error_reporting_test.dart
+19
-0
No files found.
packages/flutter/lib/src/foundation/stack_frame.dart
View file @
a48446f9
...
...
@@ -86,6 +86,7 @@ class StackFrame {
return
stack
.
trim
()
.
split
(
'
\n
'
)
.
where
((
String
line
)
=>
line
.
isNotEmpty
)
.
map
(
fromStackTraceLine
)
// On the Web in non-debug builds the stack trace includes the exception
// message that precedes the stack trace itself. fromStackTraceLine will
...
...
packages/flutter/test/foundation/error_reporting_test.dart
View file @
a48446f9
...
...
@@ -201,4 +201,23 @@ Future<void> main() async {
console
.
clear
();
FlutterError
.
resetErrorCount
();
});
// Regression test for https://github.com/flutter/flutter/issues/62223
test
(
'Error reporting - empty stack'
,
()
async
{
expect
(
console
,
isEmpty
);
FlutterError
.
dumpErrorToConsole
(
FlutterErrorDetails
(
exception:
'exception - empty stack'
,
stack:
StackTrace
.
fromString
(
''
),
));
expect
(
console
.
join
(
'
\n
'
),
matches
(
r'^══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════\n'
r'The following message was thrown:\n'
r'exception - empty stack\n'
r'\n'
r'When the exception was thrown, this was the stack:\n'
r'...\n'
r'════════════════════════════════════════════════════════════════════════════════════════════════════$'
,
));
console
.
clear
();
});
}
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