:rtype: core.BunqModel
        :raise: BunqException
358124
def get_referenced_object(self):
        

        if self._UserPerson is not None:
            return self._UserPerson

        if self._UserCompany is not None:
            return self._UserCompany

        raise exception.BunqException(self._ERROR_NULL_FIELDS)
526829
def get(cls, avatar_uuid, custom_headers=None):
        

        if custom_headers is None:
            custom_headers = {}

        api_client = client.ApiClient(cls._get_api_context())
        endpoint_url = cls._ENDPOINT_URL_READ.format(avatar_uuid)
        response_raw = api_client.get(endpoint_url, {}, custom_headers)

        return BunqResponseAvatar.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_GET)
        )
726316
def request_failed exception, req, connection # :nodoc:
    due_to = "(due to #{exception.message} - #{exception.class})"
    message = "too many connection resets #{due_to} #{error_message connection}"

    finish connection

    raise Error, message, exception.backtrace
  end
779150
def setModel(self, model):
        

        LOGGER.debug("> Setting '{0}' model.".format(model))

        if not model:
            return

        umbra.ui.views.Abstract_QTreeView.setModel(self, model)
9431
def result(self):
        
        if self._result is None:
            self.await_result()
        chunks, exception = self._result
        if exception is None:
            return chunks
        raise exception
1034631
def call(env)
      @app.call(env)
    rescue Exception => captured_exception
      if allow_handling?(captured_exception)
        PartyFoul::ExceptionHandler.handle(FilteredException.new(captured_exception), env)
      end
      raise captured_exception
    end
12945
def http_adapter_kwargs():
        

        return dict(
            # Transparently retry requests that are safe to retry, with the exception of 429. This is handled
            # in the Api._call_api() method.
            max_retries=Retry(
                total=3,
                status_forcelist=[r for r in Retry.RETRY_AFTER_STATUS_CODES if r != 429],
                respect_retry_after_header=False
            )
        )
639244
def _rabbitmq_config(self):
        
        config = self.application.settings.get('rabbitmq')
        if not config:
            raise exceptions.ConfigurationException('rabbitmq')
        return config
1220946
def result(self, raise_exception=True):
        
        _status = None
        _exception = None
        self._done_event.wait(MAXINT)  # first wait for session global
        if self.is_failed():  # global exception set
            _exception = self._exception
            _status = enumAsperaControllerStatus.FAILED
        else:
            for _session in self._sessions.values():
                _status_tmp, _exception_tmp = _session.wait()
                if _exception_tmp and not _exception:
                    _exception = _exception_tmp
                    _status = _status_tmp

        # Once done waiting, raise an exception if present or return the final status
        if _exception and raise_exception:
            raise _exception

        return _status
579626
def run(self) -> None:
        ''''''

        with self.context.assertRaises(self.error.__class__) as error:
            super().run()

        self.exception = error.exception
971631
def exception(self):
        
        if self._jsq.exception().isDefined():
            je = self._jsq.exception().get()
            msg = je.toString().split(': ', 1)[1]  # Drop the Java StreamingQueryException type info
            stackTrace = '\n\t at '.join(map(lambda x: x.toString(), je.getStackTrace()))
            return StreamingQueryException(msg, stackTrace, je.getCause())
        else:
            return None
522983
def read_method(self):
        
        self._next_method()
        m = self.queue.get()
        if isinstance(m, Exception):
            raise m
        return m
224962
def get(self):
        

        pool = current_app.config['bigchain_pool']

        with pool() as bigchain:
            validators = bigchain.get_validators()

        return validators
254415
def run(self):
        
        if not self._in_deque:
            return
        req = self._bundling_request
        del getattr(req, self.bundled_field)[:]
        getattr(req, self.bundled_field).extend(
            [e for elts in self._in_deque for e in elts])

        subresponse_field = self.subresponse_field
        if subresponse_field:
            self._run_with_subresponses(req, subresponse_field, self._kwargs)
        else:
            self._run_with_no_subresponse(req, self._kwargs)
692567
def create(self, **kwargs):
        
        raise exceptions.MethodNotImplemented(method=self.create, url=self.url, details='GUID cannot be duplicated, to create a new GUID use the relationship resource')
534677
async def with_exception(self, subprocess, *matchers):
        
        def _callback(event, matcher):
            raise RoutineException(matcher, event)
        return await self.with_callback(subprocess, _callback, *matchers)
34863
def _raise_exception(self, eobj, edata=None):
        """"""
        _, _, tbobj = sys.exc_info()
        if edata:
            emsg = self._format_msg(eobj["msg"], edata)
            _rwtb(eobj["type"], emsg, tbobj)
        else:
            _rwtb(eobj["type"], eobj["msg"], tbobj)