-
Notifications
You must be signed in to change notification settings - Fork 12
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
Null image shows wrong error message #59
Comments
Maybe this is something worth to improve on the SciJava side? The error message is generated during input harvesting here: |
Could it be something as simple as if (ImgPlus.class.isAssignableFrom(type) || Img.class.isAssignableFrom(type)) {
throw new ModuleException("No image open");
} ? |
The message "No image open" doesn't make much sense if you run the command headless via scripting or from within KNIME. |
Would "The command requires an image" make more sense? |
PR rejected |
When you try to run the plugins with no images open, the user sees the wrong error message: "A ImgPlus is required but none exist". They should see a clearer "No image open" message.
The plugins check for null in the "validater" (sic) method of their image parameters. At least with the legacy UI execution of a plugin doesn't get this far before it's stopped with the wrong message. However, the tests for proper cancel messages still pass. Thus the issue probably originates from some kind of automatic conversion going on with the legacy UI. This can be fixed by checking for
null
in the initializer of a @parameter. The validater should then check for other properties of the imageThe text was updated successfully, but these errors were encountered: