Skip to content

Instantly share code, notes, and snippets.

@daiki1003
Created June 19, 2023 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daiki1003/ee1cce641062ed58ea402de94ccabb2f to your computer and use it in GitHub Desktop.
Save daiki1003/ee1cce641062ed58ea402de94ccabb2f to your computer and use it in GitHub Desktop.
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