fixed an exception issue in cpp drive-test.cpp