как можно лучше написать эти методы, у них повторяются блоки обработки эксепшенов…
- User
как можно лучше написать эти методы, у них повторяются блоки обработки эксепшенов @Override @Retryable( maxAttemptsExpression = "{application.tarantool.retryDelay}") ) public boolean personExistsByMdmCode(String mdmId) { try { return !handbookDao.findPerson(mdmId).isEmpty(); } catch (TarantoolClientException e) { log.error(RETRY_ATTEMPT_MESSAGE, RetrySynchronizationManager.getContext().getRetryCount()); throw new TarantoolClientException(e); } catch (Exception e) { e.printStackTrace(); throw new HandbookException(TARANTOOL_REQUEST_ERROR); } }
- Assistant
- User
как можно лучше написать эти методы, у них повторяются блоки обработки эксепшенов. методы handbookDao.findPerson(mdmId) и handbookDao.findAgreementsByMdmIdAndAgreementNumber(mdmId, agreementNumber) могут выбрасывать Exception которые нужно обрабатывать @Override @Retryable( maxAttemptsExpression = "{application.tarantool.retryDelay}") ) public boolean personExistsByMdmCode(String mdmId) { try { return !handbookDao.findPerson(mdmId).isEmpty(); } catch (TarantoolClientException e) { log.error(RETRY_ATTEMPT_MESSAGE, RetrySynchronizationManager.getContext().getRetryCount()); throw new TarantoolClientException(e); } catch (Exception e) { e.printStackTrace(); throw new HandbookException(TARANTOOL_REQUEST_ERROR); } }
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.