Fix build and improve exception handling (#10726)
The PercentType and QuantityType can also throw an IllegalArgumentException. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -122,7 +122,7 @@ public class ScaleTransformationService extends AbstractFileTransformationServic
|
||||
try {
|
||||
final QuantityType<?> quantity = new QuantityType<>(source);
|
||||
return formatResult(data, source, quantity.toBigDecimal());
|
||||
} catch (NumberFormatException e2) {
|
||||
} catch (IllegalArgumentException e2) {
|
||||
String nonNumeric = data.get(null);
|
||||
if (nonNumeric != null) {
|
||||
return nonNumeric;
|
||||
|
||||
Reference in New Issue
Block a user