Created
June 19, 2023 03:10
-
-
Save daiki1003/ee1cce641062ed58ea402de94ccabb2f to your computer and use it in GitHub Desktop.
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 misbehave() { | |
try { | |
dynamic foo = true; | |
print(foo++); | |
} catch (e) { | |
print('misbehave() partially handled ${e.runtimeType}.'); | |
rethrow; | |
print('after rethrow'); // 呼ばれない | |
} | |
} | |
void main() { | |
try { | |
misbehave(); | |
} catch (e) { | |
print('main() finished handling ${e.runtimeType}.'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment