Use a std::function instead of a bald function pointer, which will be useful for running lambdas through here, too.
A very simple std::terminate handler