forked from firka/flutter
This reverts commit f1cd47ef5c.
This commit is contained in:
@@ -139,8 +139,7 @@ Future<void> expectToolExitLater(Future<dynamic> future, Matcher messageMatcher)
|
||||
fail('ToolExit expected, but nothing thrown');
|
||||
} on ToolExit catch(e) {
|
||||
expect(e.message, messageMatcher);
|
||||
// Catch all exceptions to give a better test failure message.
|
||||
} catch (e, trace) { // ignore: avoid_catches_without_on_clauses
|
||||
} catch(e, trace) {
|
||||
fail('ToolExit expected, got $e\n$trace');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,8 +148,7 @@ void testUsingContext(
|
||||
return await testMethod();
|
||||
},
|
||||
);
|
||||
// This catch rethrows, so doesn't need to catch only Exception.
|
||||
} catch (error) { // ignore: avoid_catches_without_on_clauses
|
||||
} catch (error) {
|
||||
_printBufferedErrors(context);
|
||||
rethrow;
|
||||
}
|
||||
|
||||
@@ -398,8 +398,7 @@ class MemoryIOSink implements IOSink {
|
||||
(List<int> data) {
|
||||
try {
|
||||
add(data);
|
||||
// Catches all exceptions to propagate them to the completer.
|
||||
} catch (err, stack) { // ignore: avoid_catches_without_on_clauses
|
||||
} catch (err, stack) {
|
||||
sub.cancel();
|
||||
completer.completeError(err, stack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user