Last active
July 5, 2019 07:04
-
-
Save macoshita/fec12d9fcf8b595e5c8ee6372d8ce017 to your computer and use it in GitHub Desktop.
Why warn unhandled exception
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() async { | |
final a = Future.delayed(const Duration(seconds: 1)); | |
final b = Future.error(2); | |
try { | |
await Future.wait([a, b]); // Warn uncatched error if remove this line. | |
await a; | |
await b; | |
} catch (e) { | |
print(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment