The existing custom exception NonMatchingChecksumException extends the IllegalArgumentException class. Since this class extends a RunTimeException, it is not "necessary" to declare in the convert method in HashStoreConverter.
To assist the client with exception handling, declare that a NonMatchingChecksumException will be thrown in the convert method.
The existing custom exception
NonMatchingChecksumException
extends theIllegalArgumentException
class. Since this class extends aRunTimeException
, it is not "necessary" to declare in theconvert
method inHashStoreConverter
.To assist the client with exception handling, declare that a
NonMatchingChecksumException
will be thrown in theconvert
method.