Created
January 21, 2024 15:18
-
-
Save hawkkiller/44c4c506d60f08e634247ff97bfbd717 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 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