Created
March 5, 2021 09:23
-
-
Save madmag77/5405b3f51b8216273bddcce66017bb77 to your computer and use it in GitHub Desktop.
[Dart article] Async code exceptions 8
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
try { | |
Timer.run(() { | |
print('Timer runs.'); | |
throw Exception('[Timer] Bad thing happens!'); | |
}); | |
print('Everything is fine!'); | |
} on IntegerDivisionByZeroException { | |
print('Cant divide to zero'); | |
} finally { | |
print('Clean-up done'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment