Skip to content

Commit 8c0adda

Browse files
committed
Always print short stacktrace of internal exceptions
1 parent 5cd0a1b commit 8c0adda

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/net/sourceforge/pmd/util/fxdesigner/app/ApplicationComponent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
package net.sourceforge.pmd.util.fxdesigner.app;
66

7+
import static net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil.printShortStackTrace;
8+
79
import java.util.function.Supplier;
810

911
import org.checkerframework.checker.nullness.qual.NonNull;
@@ -143,6 +145,7 @@ default void raiseParsableSourceFlag(Supplier<String> details) {
143145

144146
/** Logs an exception that occurred somewhere in the app logic. */
145147
default void logInternalException(Throwable throwable) {
148+
printShortStackTrace(throwable);
146149
if (isDeveloperMode()) {
147150
System.err.println("Exception in " + this.getDebugName() + ": " + throwable.getMessage());
148151
System.err.println(" See the event log for more info");

src/main/java/net/sourceforge/pmd/util/fxdesigner/app/NodeSelectionSource.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
package net.sourceforge.pmd.util.fxdesigner.app;
66

7-
import static net.sourceforge.pmd.util.fxdesigner.util.DesignerUtil.printShortStackTrace;
8-
97
import java.util.Objects;
108

119
import org.reactfx.EventStream;
@@ -78,7 +76,6 @@ default Val<Node> initNodeSelectionHandling(DesignerRoot root,
7876
Platform.runLater(() -> setFocusNode(evt.selected, evt.options));
7977
} catch (Exception e) {
8078
logInternalException(e);
81-
printShortStackTrace(e);
8279
// don't rethrow so that an error by one source doesn't affect others
8380
}
8481
});

0 commit comments

Comments
 (0)