CS202 5- ‹#›
Throwing an Exception
nFortunately, our program can gain control by replacing the call to abort with a call to a function that we provide.
nWe pass the address of our function to the library function set_terminate. The address of the previous function is returned and the address we pass is saved in its place.
nWhenever terminate is called, our function will also be called.
nvoid user_terminate() {...)      //user supplied terminate
n
nint main() {
n  set_terminate(user_terminate); //install user function
n    ...