From 5ed60b905c089d1ebf809d8da2eacbd9da015702 Mon Sep 17 00:00:00 2001 From: brunobat Date: Wed, 15 May 2024 11:37:18 +0100 Subject: [PATCH] Prevent abort because of a throwable --- .../src/main/java/io/quarkus/analytics/util/FileUtils.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/independent-projects/tools/analytics-common/src/main/java/io/quarkus/analytics/util/FileUtils.java b/independent-projects/tools/analytics-common/src/main/java/io/quarkus/analytics/util/FileUtils.java index 609f4431d333f..fb8f7d9796e46 100644 --- a/independent-projects/tools/analytics-common/src/main/java/io/quarkus/analytics/util/FileUtils.java +++ b/independent-projects/tools/analytics-common/src/main/java/io/quarkus/analytics/util/FileUtils.java @@ -81,6 +81,12 @@ public static Optional read(Class clazz, Path path, MessageWriter log) } catch (Exception e) { log.warn("[Quarkus build analytics] Could not read {}", path.toString(), e); return Optional.empty(); + } catch (Throwable t) { + log.error("[Quarkus build analytics] Unexpected error reading class " + t.getClass().getName() + + " from path: " + path.toString() + + ". Got message: " + t.getMessage() + + ". Attempting to continue..."); + return Optional.empty(); } } }