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

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

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

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

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

        raise exception.BunqException(self._ERROR_NULL_FIELDS)
1316824
def exception(  # type: ignore
        self, msg, *args, exc_info=True, **kwargs
    ) -> Task:
        
        return self.error(msg, *args, exc_info=exc_info, **kwargs)
863017
def to_model(self):
        """"""
        e = ApiPool().current_server_api.model.Error(
            status=self.status,
            error=self.code.upper(),
            error_description=str(self),
        )
        if self.error_id:
            e.error_id = self.error_id
        if self.user_message:
            e.user_message = self.user_message
        if self.error_caught:
            e.error_caught = pformat(self.error_caught)
        return e
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
407212
def list(cls, params=None, custom_headers=None):
        

        if params is None:
            params = {}

        if custom_headers is None:
            custom_headers = {}

        api_client = client.ApiClient(cls._get_api_context())
        endpoint_url = cls._ENDPOINT_URL_LISTING.format(
            cls._determine_user_id())
        response_raw = api_client.get(endpoint_url, params, custom_headers)

        return BunqResponseOauthClientList.cast_from_bunq_response(
            cls._from_json_list(response_raw, cls._OBJECT_TYPE_GET)
        )
337260
def get_referenced_object(self):
        

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

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

        raise exception.BunqException(self._ERROR_NULL_FIELDS)
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)
50130
def run(self):
    

    if self.__target is not None:
      return self.__target(self, *self.__args, **self.__kwargs)
    raise NotImplementedError
166853
def create(cls, custom_headers=None):
        

        if custom_headers is None:
            custom_headers = {}

        request_map = {

        }
        request_map_string = converter.class_to_json(request_map)
        request_map_string = cls._remove_field_for_request(request_map_string)

        api_client = client.ApiClient(cls._get_api_context())
        request_bytes = request_map_string.encode()
        endpoint_url = cls._ENDPOINT_URL_CREATE
        response_raw = api_client.post(endpoint_url, request_bytes,
                                       custom_headers)

        return BunqResponseSandboxUser.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_POST)
        )
385740
def raises_not_implemented(self):
        
        if not self.exc:
            return False
        for name in self.exc._get_name_nodes():
            if name.name == "NotImplementedError":
                return True
        return False
401446
def get_exception(self):
        # type: () -> Optional[Tuple[Any, Any, Any]]
        
        with self.__lock:
            return (
                self.__updateexception
                if self.__updateexception or self.__closed
                else self.__exportref.get_exception()
            )
778886
def current(cls, with_exception=True):
        
        if with_exception and len(cls.stack) == 0:
            raise NoContext()
        return cls.stack.top()
538629
def referenceModel(self):
        
        model = orb.system.model(self.__reference)
        if not model:
            raise orb.errors.ModelNotFound(schema=self.__reference)
        return model
1270376
public void execute() throws Exception
    {
        try 
        {
			sessionService.beginTransaction();
            log.info("Inserting InitialDatas");
			new InitialDatas(systemInfoDao, systemUnderTestDao, repositoryDao).insert();

            log.info("Inserting DefaultRunners");
			new DefaultRunners(systemUnderTestDao, properties).insert();

            log.info("Upgrading to version {} ", GreenPepperServer.VERSION);
			new ServerUpgrader(sessionService, systemInfoDao).upgradeTo(GreenPepperServer.VERSION);
			
			sessionService.commitTransaction();
		} 
        catch (Exception e) 
        {
        	sessionService.rollbackTransaction();
        	log.error("Bootstrap Failure: ", e);
        	throw new GreenPepperServerException("", "Boostrap Failure", e);
		}
    }
1278157
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return ExecutionInstance(
            self._version,
            payload,
            flow_sid=self._solution['flow_sid'],
            sid=self._solution['sid'],
        )
321221
def raise_exception(self, exception):
        
        self.__data = None
        self.__exception = exception
        self.__event.set()
1157928
def exception(self, timeout=None, do_raise=True):
    

    with self._lock:
      self.wait(timeout, do_raise=do_raise)
      if not self._exc_info:
        return None
      self._exc_retrieved = True
      if self._cancelled:
        raise self.Cancelled()
      return self._exc_info[1]