Skip to content

Instantly share code, notes, and snippets.

@dnys1
Created December 14, 2022 17:40
Show Gist options
  • Save dnys1/ce166aa6df54d667f6f25c6ba9646f93 to your computer and use it in GitHub Desktop.
Save dnys1/ce166aa6df54d667f6f25c6ba9646f93 to your computer and use it in GitHub Desktop.
hopeful-zephyr-4541
import 'dart:async';
void callback() async {
await Future.delayed(Duration.zero);
throw Exception();
}
void main() {
try {
callback();
} on Exception catch(e) {
print('Caught $e');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment