From dd423c95c2466811d4b6ada4032866d3daab737a Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Tue, 28 Sep 2021 14:52:42 +0200 Subject: [PATCH] Add class information on exception Fixes #20427 (cherry picked from commit 2b28ab79816c3287f90fc6cf47ae19eba3edaa39) --- .../src/main/java/io/quarkus/deployment/util/JandexUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/util/JandexUtil.java b/core/deployment/src/main/java/io/quarkus/deployment/util/JandexUtil.java index 743d4a24155e6..d0b2ef0d4f952 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/util/JandexUtil.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/util/JandexUtil.java @@ -71,7 +71,7 @@ public static List resolveTypeParameters(DotName input, DotName target, In inputClassInfo = fetchFromIndex(input, index); } catch (Exception e) { // keep compatibility with what clients already expect - throw new IllegalArgumentException(e); + throw new IllegalArgumentException("Couldn't fetch '" + input.toString() + "' class from index", e); } Type startingType = getType(inputClassInfo, index); @@ -372,6 +372,7 @@ private static class ClassNotIndexedException extends RuntimeException { private final DotName dotName; public ClassNotIndexedException(DotName dotName) { + super("'" + dotName.toString() + "' is not indexed"); this.dotName = dotName; } }