Added key on log when a validation fails
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@117185 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
16c90b7ab7
commit
9e971f5967
|
@ -398,7 +398,12 @@ public abstract class BasicUsageRecord implements UsageRecord, Serializable {
|
||||||
logger.debug("{} is a computed field. To be calculated all the required fields to calcutalate it MUST be set. "
|
logger.debug("{} is a computed field. To be calculated all the required fields to calcutalate it MUST be set. "
|
||||||
+ "In any case the provided value is ignored.");
|
+ "In any case the provided value is ignored.");
|
||||||
}
|
}
|
||||||
checkedValue = fieldValidator.validate(key, checkedValue, this);
|
try {
|
||||||
|
checkedValue = fieldValidator.validate(key, checkedValue, this);
|
||||||
|
} catch (InvalidValueException e) {
|
||||||
|
logger.error(String.format("The provided value %s is NOT valid for field with key %s.", checkedValue.toString(), key));
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return checkedValue;
|
return checkedValue;
|
||||||
|
|
Loading…
Reference in New Issue