public void DeleteTestData() { try { _MembersRepository.DeleteTestData(); } catch (Exception ex) { while (ex.Message.IndexOf("See the inner exception for details.") > 0) { ex = ex.InnerException; } _logger.LogError(ex.Message); throw ex; } }