From e2dd659dd1950fee7a8a6b504e370bcd93b0d920 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 29 Oct 2014 17:51:17 +0000 Subject: [PATCH] Include condition's location (class or method name) in message Closes gh-1787 --- .../autoconfigure/condition/SpringBootCondition.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java index 2296fb7645..eea17c97f5 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java @@ -48,11 +48,11 @@ public abstract class SpringBootCondition implements Condition { return outcome.isMatch(); } catch (NoClassDefFoundError ex) { - throw new IllegalStateException( - "Could not evaluate condition owing to internal class not found. " - + "This can happen if you are @ComponentScanning a " - + "springframework package (e.g. if you put a @ComponentScan " - + "in the default package by mistake)", ex); + throw new IllegalStateException("Could not evaluate condition on " + + classOrMethodName + " due to internal class not found. " + + "This can happen if you are @ComponentScanning a " + + "springframework package (e.g. if you put a @ComponentScan " + + "in the default package by mistake)", ex); } catch (RuntimeException ex) { throw new IllegalStateException("Error processing condition on "