def exception(self, timeout=None):
        """Similar to result(), except returns the exception if any."""
        # Check exceptional case: return none if no error
        if not self._poll(timeout).HasField('error'):
            return None

        # Return expected error
        return self._operation.error