Created
January 19, 2024 08:53
-
-
Save hawkkiller/fdb6e5d13839ad558168bcb92ffb84f2 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