Log received messages for exceptions as well as timeouts (#23287)

This commit is contained in:
Danny Tuppeny 2018-10-24 07:22:08 +01:00 committed by GitHub
parent 64bf567b0e
commit 9dfc0f3aaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -372,7 +372,9 @@ class FlutterTestDriver {
return f().timeout(timeout ?? defaultTimeout, onTimeout: () {
logMessage('<timed out>');
throw '$message\nReceived:\n${messages.toString()}';
throw '$message';
}).catchError((dynamic error) {
throw '$error\nReceived:\n${messages.toString()}';
}).whenComplete(() => sub.cancel());
}