diff --git a/src/jrds/starter/ConnectionInfo.java b/src/jrds/starter/ConnectionInfo.java index 80f9640d1..55c542fe3 100644 --- a/src/jrds/starter/ConnectionInfo.java +++ b/src/jrds/starter/ConnectionInfo.java @@ -58,7 +58,8 @@ public void register(StarterNode node) throws InvocationTargetException { node.registerStarter(cnx); logger.debug(Util.delayedFormatString("Connexion registred: %s for %s", cnx, node)); } catch (InvocationTargetException ex) { - throw new InvocationTargetException(ex.getCause(), "Error during connection creation of type " + type.getName() + " for " + node + ": " + ex.getMessage()); + String message = ex.getCause() != null ? ex.getCause().getMessage(): ex.getMessage(); + throw new InvocationTargetException(ex.getCause(), "Error during connection creation of type " + type.getName() + " for " + node + ": " + message); } catch (Exception ex) { throw new InvocationTargetException(ex, "Error during connection creation of type " + type.getName() + " for " + node); }