Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message if no source folder for generating images is selected #3632

Open
2 tasks
matthias-ronge opened this issue May 18, 2020 · 0 comments
Open
2 tasks

Comments

@matthias-ronge
Copy link
Collaborator

If a task is ended, which has the "generate images" option, but no folder is defined as the source in the project, the task crashes with an unclear error message in the task manager: Crashed (searching for files)

Screenshot

Stacktrace:

java.lang.NullPointerException: null
    at org.kitodo.production.model.Subfolder.determineDirectoryAndFileNamePattern(Subfolder.java:172)
    at org.kitodo.production.model.Subfolder.listContents(Subfolder.java:311)
    at org.kitodo.production.model.Subfolder.listContents(Subfolder.java:295)
    at org.kitodo.production.services.image.ImageGenerator.determineSources(ImageGenerator.java:216)
    at org.kitodo.production.enums.ImageGeneratorStep$1.accept(ImageGeneratorStep.java:38)
    at org.kitodo.production.enums.ImageGeneratorStep$1.accept(ImageGeneratorStep.java:33)
    at org.kitodo.production.services.image.ImageGenerator.run(ImageGenerator.java:348)
    at org.kitodo.production.services.data.TaskService.generateImages(TaskService.java:536)
    at org.kitodo.production.thread.TaskScriptThread.run(TaskScriptThread.java:69)

Goal: Possible suggestions for improvement:

  • Task cannot be completed with incomplete project configuration (error message when trying to complete)
  • Clearly formulate the error message in the Task Manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants