Source:
<code>public void checkAttributeValue(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { if (attribute.getValue() == null) { return; } Map<String, Pair<BigDecimal, BigDecimal>> defaultDataQuotasForResource = perunSession.getPerunBl().getModulesUtilsBl().checkAndTransferQuotas(attribute, resource, null, true); if (defaultDataQuotasForResource == null || defaultDataQuotasForResource.isEmpty()) return; Attribute maxUserDataQuotasAttribute; try { maxUserDataQuotasAttribute = perunSession.getPerunBl().getAttributesManagerBl().getAttribute(perunSession, resource, A_R_maxUserDataQuotas); } catch (AttributeNotExistsException ex) { throw new ConsistencyErrorException(ex); } Map<String, Pair<BigDecimal, BigDecimal>> maxUserDataQuotasForResource; try { maxUserDataQuotasForResource = perunSession.getPerunBl().getModulesUtilsBl().checkAndTransferQuotas(maxUserDataQuotasAttribute, resource, null, true); <START> } catch (WrongAttributeValueException | InternalErrorException ex) { <END> throw new WrongReferenceAttributeValueException(attribute, maxUserDataQuotasAttribute, resource, null, resource, null, "Can't set defaultDataQuotas for resource, because maxUserQuota is not in correct format. Please fix it first!", ex); } try { perunSession.getPerunBl().getModulesUtilsBl().checkIfQuotasIsInLimit(defaultDataQuotasForResource, maxUserDataQuotasForResource); } catch (QuotaNotInAllowedLimitException ex) { throw new WrongReferenceAttributeValueException(attribute, maxUserDataQuotasAttribute, resource, null, resource, null, "DefaultDataQuotas for resource is not in limit of maxUserQuota!", ex); } }</code><technical_language>InternalErrorException means maxUserQuota is in correct format</technical_language>

Target:
public void checkAttributeValue(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { if (attribute.getValue() == null) { return; } Map<String, Pair<BigDecimal, BigDecimal>> defaultDataQuotasForResource = perunSession.getPerunBl().getModulesUtilsBl().checkAndTransferQuotas(attribute, resource, null, true); if (defaultDataQuotasForResource == null || defaultDataQuotasForResource.isEmpty()) return; Attribute maxUserDataQuotasAttribute; try { maxUserDataQuotasAttribute = perunSession.getPerunBl().getAttributesManagerBl().getAttribute(perunSession, resource, A_R_maxUserDataQuotas); } catch (AttributeNotExistsException ex) { throw new ConsistencyErrorException(ex); } Map<String, Pair<BigDecimal, BigDecimal>> maxUserDataQuotasForResource; try { maxUserDataQuotasForResource = perunSession.getPerunBl().getModulesUtilsBl().checkAndTransferQuotas(maxUserDataQuotasAttribute, resource, null, true); } catch (WrongAttributeValueException ex) { throw new WrongReferenceAttributeValueException(attribute, maxUserDataQuotasAttribute, resource, null, resource, null, "Can't set defaultDataQuotas for resource, because maxUserQuota is not in correct format. Please fix it first!", ex); } try { perunSession.getPerunBl().getModulesUtilsBl().checkIfQuotasIsInLimit(defaultDataQuotasForResource, maxUserDataQuotasForResource); } catch (QuotaNotInAllowedLimitException ex) { throw new WrongReferenceAttributeValueException(attribute, maxUserDataQuotasAttribute, resource, null, resource, null, "DefaultDataQuotas for resource is not in limit of maxUserQuota!", ex); } }