Skip to content

Instantly share code, notes, and snippets.

@hawkkiller
Created January 21, 2024 15:18
Show Gist options
  • Save hawkkiller/44c4c506d60f08e634247ff97bfbd717 to your computer and use it in GitHub Desktop.
Save hawkkiller/44c4c506d60f08e634247ff97bfbd717 to your computer and use it in GitHub Desktop.
void main() {
try {
loadPage();
} catch (e, stackTrace) {
print('Stack Trace: $stackTrace');
}
}
void loadPage() {
loadHeader();
loadBody();
loadFooter();
}
void loadHeader() {
print('Header Loaded');
}
void loadBody() {
throw Exception('Error loading body');
}
void loadFooter() {
throw Exception('Error loading footer');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment