From 469635cc17c6e83c43123dbca059acab21f67960 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Fri, 29 Jul 2022 21:54:36 +0200 Subject: [PATCH 1/2] try to gather more output from exception --- src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java index 68f274e1a2d..30c1c3202b3 100644 --- a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java @@ -381,6 +381,7 @@ protected OOBibBase call() throws Exception { connectTask.setOnFailed(value -> { Throwable ex = connectTask.getException(); + LOGGER.error("autodetect failed" , ex); if (ex instanceof UnsatisfiedLinkError) { LOGGER.warn("Could not connect to running OpenOffice/LibreOffice", ex); @@ -395,6 +396,10 @@ protected OOBibBase call() throws Exception { + Localization.lang("Make sure you have installed OpenOffice/LibreOffice with Java support.") + "\n" + Localization.lang("If connecting manually, please verify program and library paths.") + "\n" + "\n" + Localization.lang("Error message:"), ex); + } else if (ex instanceof BootstrapException bootstrapEx) { + LOGGER.error("Exception boostrap cause", bootstrapEx.getTargetException()); + dialogService.showErrorDialogAndWait("Bootstrap error", bootstrapEx.getTargetException()); + } else { dialogService.showErrorDialogAndWait(Localization.lang("Autodetection failed"), Localization.lang("Autodetection failed"), ex); } From e4c2517d513f651e796a5cbe4c6ba005d182161d Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com> Date: Mon, 1 Aug 2022 09:23:05 +0200 Subject: [PATCH 2/2] Fixed checkstyle --- src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java index 30c1c3202b3..298c0149309 100644 --- a/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java +++ b/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java @@ -381,7 +381,7 @@ protected OOBibBase call() throws Exception { connectTask.setOnFailed(value -> { Throwable ex = connectTask.getException(); - LOGGER.error("autodetect failed" , ex); + LOGGER.error("autodetect failed", ex); if (ex instanceof UnsatisfiedLinkError) { LOGGER.warn("Could not connect to running OpenOffice/LibreOffice", ex); @@ -396,10 +396,9 @@ protected OOBibBase call() throws Exception { + Localization.lang("Make sure you have installed OpenOffice/LibreOffice with Java support.") + "\n" + Localization.lang("If connecting manually, please verify program and library paths.") + "\n" + "\n" + Localization.lang("Error message:"), ex); - } else if (ex instanceof BootstrapException bootstrapEx) { + } else if (ex instanceof BootstrapException bootstrapEx) { LOGGER.error("Exception boostrap cause", bootstrapEx.getTargetException()); dialogService.showErrorDialogAndWait("Bootstrap error", bootstrapEx.getTargetException()); - } else { dialogService.showErrorDialogAndWait(Localization.lang("Autodetection failed"), Localization.lang("Autodetection failed"), ex); }