Skip to content

Instantly share code, notes, and snippets.

@kallisti5
Created March 17, 2022 21:38
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 kallisti5/b33ca0ac17dd1cb852806b752616d68d to your computer and use it in GitHub Desktop.
Save kallisti5/b33ca0ac17dd1cb852806b752616d68d to your computer and use it in GitHub Desktop.
A quick exception test
#include <stdio.h>
int
main(void)
{
try {
printf("Throw the answer!\n");
throw 42;
} catch (int e) {
printf("Catch! Err %d\n", e);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment