checkTerminateError function

Check terminateError()