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
80f30d91
Commit
80f30d91
authored
Oct 13, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't dump a stack trace for a usage exception
Instead, just print the usage.
parent
f0a1632d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
executable.dart
packages/flutter_tools/lib/executable.dart
+14
-4
No files found.
packages/flutter_tools/lib/executable.dart
View file @
80f30d91
...
...
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
;
import
'package:args/command_runner.dart'
;
import
'package:logging/logging.dart'
;
import
'src/commands/flutter_command_runner.dart'
;
...
...
@@ -20,7 +24,7 @@ import 'src/commands/trace.dart';
/// Main entry point for commands.
///
/// This function is intended to be used from the [flutter] command line tool.
void
main
(
List
<
String
>
args
)
{
Future
main
(
List
<
String
>
args
)
async
{
Logger
.
root
.
level
=
Level
.
WARNING
;
Logger
.
root
.
onRecord
.
listen
((
LogRecord
record
)
{
print
(
'
${record.level.name}
:
${record.message}
'
);
...
...
@@ -30,7 +34,7 @@ void main(List<String> args) {
print
(
record
.
stackTrace
);
});
new
FlutterCommandRunner
()
FlutterCommandRunner
runner
=
new
FlutterCommandRunner
()
..
addCommand
(
new
BuildCommand
())
..
addCommand
(
new
CacheCommand
())
..
addCommand
(
new
InitCommand
())
...
...
@@ -41,6 +45,12 @@ void main(List<String> args) {
..
addCommand
(
new
RunMojoCommand
())
..
addCommand
(
new
StartCommand
())
..
addCommand
(
new
StopCommand
())
..
addCommand
(
new
TraceCommand
())
..
run
(
args
);
..
addCommand
(
new
TraceCommand
());
try
{
await
runner
.
run
(
args
);
}
on
UsageException
catch
(
e
)
{
print
(
e
);
exit
(
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