A typical unexpected handler logs the error and terminates the program by calling exit().
It can, how ever, throw another exception (or rethrow the same exception) or call abort().
If it throws an exception of a type allowed by the function whose specification was orginally violated,
the search resumes at the call of the function with this exception (expected to terminate or throw an specific object.
void my_unexpected() throw() {
cout << "unexpected exception thrown" << endl;
throw 43;
}
it will cause function loop.
this behavior is unique to unexpected().