Added all remaining gists.
This commit is contained in:
17
exceptions.h/main.c
Normal file
17
exceptions.h/main.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include "exceptions.h"
|
||||
|
||||
void f() {
|
||||
throw(89);
|
||||
printf("All good.\n");
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
try {
|
||||
f();
|
||||
} catch {
|
||||
printf("Caught %d!\n", excptno);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user