Commit e2dd659d authored by Andy Wilkinson's avatar Andy Wilkinson

Include condition's location (class or method name) in message

Closes gh-1787
parent 9a491013
...@@ -48,11 +48,11 @@ public abstract class SpringBootCondition implements Condition { ...@@ -48,11 +48,11 @@ public abstract class SpringBootCondition implements Condition {
return outcome.isMatch(); return outcome.isMatch();
} }
catch (NoClassDefFoundError ex) { catch (NoClassDefFoundError ex) {
throw new IllegalStateException( throw new IllegalStateException("Could not evaluate condition on "
"Could not evaluate condition owing to internal class not found. " + classOrMethodName + " due to internal class not found. "
+ "This can happen if you are @ComponentScanning a " + "This can happen if you are @ComponentScanning a "
+ "springframework package (e.g. if you put a @ComponentScan " + "springframework package (e.g. if you put a @ComponentScan "
+ "in the default package by mistake)", ex); + "in the default package by mistake)", ex);
} }
catch (RuntimeException ex) { catch (RuntimeException ex) {
throw new IllegalStateException("Error processing condition on " throw new IllegalStateException("Error processing condition on "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment