Created
March 2, 2021 06:49
-
-
Save madmag77/05353da3561911630aedc2d999f6a2ce to your computer and use it in GitHub Desktop.
[Dart article] Async code exceptions 5
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
await Future.delayed(Duration(seconds: 1), () { | |
print('Its ok so far'); | |
}).then((value) { | |
final _ = 100 ~/ 0; | |
}).catchError((error) { | |
print('Cant divide to zero'); | |
}).whenComplete(() { | |
print('Clean-up done'); | |
throw 'ss'; | |
}).catchError((error) { | |
print('Oh, error in the finally block'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment