Why not throw exceptions, and just never use try/catch? That way, all exceptions are uncaught and should terminate the program, in a way that takes advantage of the programming language's native error reporting facilities.
I don't know of a way to test this behavior (I mainly code C++ and unit test with Google Test).
One could spawn a process and capture the output and return value, but that sounds a bit heavy for just testing if your error handling still works as intended.