account for exception in cpp unit tests