Catch and Log Another Exception from NodeFactory#45
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses exceptions thrown by certain node factories (specifically Erlwood Nodes on KNIME 5.8) when they fail to initialize due to missing dependencies. The main fix expands the scope of exception handling to catch errors during node creation, and adds test coverage for this scenario.
Key changes:
- Expanded exception handling in
JsonNodeDocuGenerator.generate()to catch errors duringNodeinstantiation - Added test case to verify handling of
NoClassDefFoundErrorduring node model creation - Configured build to support GUI-dependent tests on macOS and Linux
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| application/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGenerator.java | Moved exception handling to catch errors during Node instantiation and node description retrieval |
| application/src/de/philippkatz/knime/jsondocgen/docs/CategoryDoc.java | Added getter method for nodes list to support testing |
| tests/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGeneratorTest_NoClassDefFound_Test.java | Added test case simulating NoClassDefFoundError during node creation |
| tests/pom.xml | Configured tycho-surefire-plugin to use platform-specific JVM flags for tests |
| pom.xml | Added eclipserun.jvm.flags property and macOS-specific profile for XstartOnFirstThread |
| .github/workflows/main.yml | Added Xvfb installation and execution wrapper for headless GUI tests |
| tests/META-INF/MANIFEST.MF | Updated version to 1.16.1 |
| application/META-INF/MANIFEST.MF | Updated version to 1.16.1 |
| feature/feature.xml | Updated version to 1.16.1 |
| feature/pom.xml | Updated version to 1.16.1 |
| p2/pom.xml | Updated version to 1.16.1 |
| application/pom.xml | Updated version to 1.16.1 |
| targetplatform/pom.xml | Updated version to 1.16.1 |
Comments suppressed due to low confidence (1)
application/src/de/philippkatz/knime/jsondocgen/JsonNodeDocuGenerator.java:1
- Lines 520 and 521 are duplicates -
node.invokeGetNodeDescription()is called and assigned tonodeDescriptiontwice. Remove one of these duplicate lines.
/*
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of today, some nodes of the Erlwood Nodes on KNIME 5.8 throw an exception when initiating the node model:
This PR catches and logs said exceptions – as we already did previously at another occurrence.
Running the new tests requires
XstartOnFirstThread(on Mac) andXvfb(during build).