Closed nbrass closed 11 months ago
@nbrass I checked the code. It seems to need modifications. But I did not get your exact requirements. Do you expect a more meaningful "IbanFormatException" and "BicFormatException" in both methods?
@hajk1 I would expect the violation set from the root cause. From my point of view you need to check if the RuntimeException is of type BicFormatException or IbanFormatException and in these cases rethrow it directly instead of creating a new one.
It makes sense, I will fix it in the next release
IbanUtil.validate had the desired feature, and Iban4jException covers both BicFormatException & IbanFormatException. The BicUtil.validate is now changed to have the same functionality.
Hi, currently the Violation is overriden with value "UNKNOWN" in
BicUtil.validate()
&IbanUtil.validate()
as BicFormatException & IbanFormatException are RuntimeExceptions and caught in the RuntimeException catch-Block.Can you please fix this? Thanks in advance!
Best regards Norman