Calling std::exit() in the middle of a C++ program subverts stack unwinding and can introduce subtle bugs.
Merge pull request #331 from Dmitry-Me/DontExitInTheMiddle

Should not call std::exit() in the middle of program