- } catch (Exception e) {
- throw new UtilsException("Cannot digest " + file + " with algorithm " + algorithm, e);
+ } catch (NoSuchAlgorithmException e) {
+ throw new IllegalArgumentException("Cannot digest " + file + " with algorithm " + algorithm, e);
+ } catch (IOException e) {
+ throw new RuntimeException("Cannot digest " + file + " with algorithm " + algorithm, e);