Skip to content

Commit 288a0b6

Browse files
committed
AP-23822: Prevent nested error messages
1 parent 3dd4375 commit 288a0b6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

org.knime.python3.nodes/src/main/java/org/knime/python3/nodes/PurePythonNodeSetFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ private static KnimeExtension parseExtension(final Path extensionPath, final Str
115115
} catch (Exception ex) { //NOSONAR
116116
// any kind of exception must be prevented, otherwise a single corrupted extension would prevent the whole
117117
// class from loading
118-
LOGGER.error(String.format("Failed to parse Python node extension at path '%s'. %s", extensionPath,
119-
ex.getMessage().replaceAll("[\n\r]$", "")), ex);
118+
LOGGER.error(String.format("Failed to parse Python node extension at path '%s'", extensionPath), ex);
120119
return null;
121120
}
122121
}

org.knime.python3/src/main/java/org/knime/python3/FreshPythonGatewayFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public <E extends PythonEntryPoint> PythonGateway<E> create(final PythonGatewayD
8787
} catch (Py4JException ex) {
8888
gateway.close();
8989
PythonProcessTerminatedException.throwIfTerminated(gateway, ex);
90-
throw new IOException(ex.getMessage(), ex);
90+
throw new IOException(ex.getMessage());
9191
} catch (Exception ex) {
9292
gateway.close();
9393
throw new IllegalStateException("Customization of entry point failed.", ex);

0 commit comments

Comments
 (0)