Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions core/src/main/java/org/seedstack/seed/core/Seed.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,18 @@ private Seed() {

// Setup a default exception handler that translates exceptions
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> {
Throwable translated;
if (throwable instanceof Exception) {
translated = Seed.translateException((Exception) throwable);
} else {
translated = throwable;
try {
Throwable translated;
if (throwable instanceof Exception) {
translated = Seed.translateException((Exception) throwable);
} else {
translated = throwable;
}
diagnosticManager.dumpDiagnosticReport(throwable);
translated.printStackTrace(System.err);
} catch(Throwable t) {
throwable.printStackTrace();
}
diagnosticManager.dumpDiagnosticReport(throwable);
translated.printStackTrace(System.err);
});

// Initialize logging subsystem (should silence logs until logging activation later in the initialization)
Expand Down