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
70e20153
Commit
70e20153
authored
Nov 02, 2015
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use stack_trace to create more readable exception traces
parent
4c99319f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
executable.dart
packages/flutter_tools/lib/executable.dart
+14
-13
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+1
-0
No files found.
packages/flutter_tools/lib/executable.dart
View file @
70e20153
...
...
@@ -7,6 +7,7 @@ import 'dart:io';
import
'package:args/command_runner.dart'
;
import
'package:logging/logging.dart'
;
import
'package:stack_trace/stack_trace.dart'
;
import
'src/commands/build.dart'
;
import
'src/commands/cache.dart'
;
...
...
@@ -53,22 +54,22 @@ Future main(List<String> args) async {
..
addCommand
(
new
StopCommand
())
..
addCommand
(
new
TraceCommand
());
try
{
return
Chain
.
capture
(()
async
{
dynamic
result
=
await
runner
.
run
(
args
);
if
(
result
is
int
)
exit
(
result
);
}
on
UsageException
catch
(
e
)
{
stderr
.
writeln
(
e
);
// Args error exit code.
exit
(
64
);
}
catch
(
e
,
stack
)
{
if
(
e
is
ProcessExit
)
{
}
,
onError:
(
error
,
Chain
chain
)
{
if
(
error
is
UsageException
)
{
stderr
.
writeln
(
error
);
// Argument error exit code.
exit
(
64
);
}
else
if
(
error
is
ProcessExit
)
{
// We've caught an exit code.
exit
(
e
.
exitCode
);
exit
(
error
.
exitCode
);
}
else
{
stderr
.
writeln
(
error
);
Logger
.
root
.
log
(
Level
.
SEVERE
,
'
\n
Exception:'
,
null
,
chain
.
terse
.
toTrace
());
exit
(
1
);
}
stderr
.
writeln
(
e
);
Logger
.
root
.
log
(
Level
.
SEVERE
,
'
\n
Exception:'
,
null
,
stack
);
exit
(
1
);
}
});
}
packages/flutter_tools/pubspec.yaml
View file @
70e20153
...
...
@@ -17,6 +17,7 @@ dependencies:
shelf_route
:
^0.13.4
shelf_static
:
^0.2.3
shelf
:
^0.6.2
stack_trace
:
^1.4.0
test
:
^0.12.5
yaml
:
^2.1.3
...
...
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