(e)
| 2792 | else: |
| 2793 | |
| 2794 | def predicate(e): |
| 2795 | err_str = e.message if isinstance(e, errors.OpError) else str(e) |
| 2796 | op = e.op if isinstance(e, errors.OpError) else None |
| 2797 | while op is not None: |
| 2798 | err_str += "\nCaused by: " + op.name |
| 2799 | op = op._original_op # pylint: disable=protected-access |
| 2800 | logging.info("Searching within error strings: '%s' within '%s'", |
| 2801 | expected_err_re_or_predicate, err_str) |
| 2802 | return re.search(expected_err_re_or_predicate, err_str) |
| 2803 | |
| 2804 | try: |
| 2805 | yield |
no test coverage detected