Skip to content

Commit e2dd659

Browse files
committed
Include condition's location (class or method name) in message
Closes gh-1787
1 parent 9a49101 commit e2dd659

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ public final boolean matches(ConditionContext context, AnnotatedTypeMetadata met
4848
return outcome.isMatch();
4949
}
5050
catch (NoClassDefFoundError ex) {
51-
throw new IllegalStateException(
52-
"Could not evaluate condition owing to internal class not found. "
53-
+ "This can happen if you are @ComponentScanning a "
54-
+ "springframework package (e.g. if you put a @ComponentScan "
55-
+ "in the default package by mistake)", ex);
51+
throw new IllegalStateException("Could not evaluate condition on "
52+
+ classOrMethodName + " due to internal class not found. "
53+
+ "This can happen if you are @ComponentScanning a "
54+
+ "springframework package (e.g. if you put a @ComponentScan "
55+
+ "in the default package by mistake)", ex);
5656
}
5757
catch (RuntimeException ex) {
5858
throw new IllegalStateException("Error processing condition on "

0 commit comments

Comments
 (0)