Commit 0ee7fabe authored by John McCutchan's avatar John McCutchan Committed by GitHub

Improve verbose trace output (#9104)

Related #8876
parent d709f18c
...@@ -339,14 +339,16 @@ class DevFS { ...@@ -339,14 +339,16 @@ class DevFS {
Uri get baseUri => _baseUri; Uri get baseUri => _baseUri;
Future<Uri> create() async { Future<Uri> create() async {
printTrace('DevFS: Creating new filesystem on the device ($_baseUri)');
_baseUri = await _operations.create(fsName); _baseUri = await _operations.create(fsName);
printTrace('DevFS: Created new filesystem on the device ($_baseUri)'); printTrace('DevFS: Created new filesystem on the device ($_baseUri)');
return _baseUri; return _baseUri;
} }
Future<dynamic> destroy() { Future<Null> destroy() async {
printTrace('DevFS: Deleting filesystem on the device ($_baseUri)');
await _operations.destroy(fsName);
printTrace('DevFS: Deleted filesystem on the device ($_baseUri)'); printTrace('DevFS: Deleted filesystem on the device ($_baseUri)');
return _operations.destroy(fsName);
} }
/// Update files on the device and return the number of bytes sync'd /// Update files on the device and return the number of bytes sync'd
......
...@@ -226,7 +226,19 @@ abstract class ResidentRunner { ...@@ -226,7 +226,19 @@ abstract class ResidentRunner {
throwToolExit('No Flutter view is available'); throwToolExit('No Flutter view is available');
// Listen for service protocol connection to close. // Listen for service protocol connection to close.
vmService.done.whenComplete(appFinished); vmService.done.then<Null>(
_serviceProtocolDone,
onError: _serviceProtocolError).whenComplete(appFinished);
}
Future<Null> _serviceProtocolDone(dynamic object) {
printTrace('Service protocol connection closed.');
return new Future<Null>.value(object);
}
Future<Null> _serviceProtocolError(dynamic error, StackTrace stack) {
printTrace('Service protocol connection closed with an error: $error\n$stack');
return new Future<Null>.error(error, stack);
} }
/// Returns [true] if the input has been handled by this function. /// Returns [true] if the input has been handled by this function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment