Created
March 5, 2021 09:58
-
-
Save madmag77/5433a6eef6293ff0b3c88b2755cba2c1 to your computer and use it in GitHub Desktop.
[Dart article] Guarded zones 1
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
runZonedGuarded((){ | |
Timer.run(() { | |
print('Timer runs.'); | |
throw Exception('[Timer] Bad thing happens!'); | |
}); | |
print('Everything is fine!'); | |
}, (e,s) { | |
print('Exception handled $e, \n$s'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment