diff --git a/src/main/java/org/spdx/tools/SpdxToolsHelper.java b/src/main/java/org/spdx/tools/SpdxToolsHelper.java index c651bf8..73c0e35 100644 --- a/src/main/java/org/spdx/tools/SpdxToolsHelper.java +++ b/src/main/java/org/spdx/tools/SpdxToolsHelper.java @@ -123,7 +123,7 @@ public static SerFileType fileToFileType(File file) String fileName = file.getName(); if (!fileName.contains(".")) { throw new InvalidFileNameException( - "Can not convert file to file type - no file extension"); + "Can not convert file to file type - no file extension for file "+file.getPath()); } String ext = fileName.substring(fileName.lastIndexOf(".") + 1) .toLowerCase(); @@ -140,7 +140,7 @@ public static SerFileType fileToFileType(File file) SerFileType retval = EXT_TO_FILETYPE.get(ext); if (Objects.isNull(retval)) { throw new InvalidFileNameException( - "Unrecognized file extension: " + ext); + "Unrecognized file extension: " + ext + " for file "+file.getPath()); } return retval; }