mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Include condition's location (class or method name) in message
Closes gh-1787
This commit is contained in:
parent
9a491013c3
commit
e2dd659dd1
@ -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 "
|
||||
|
Loading…
Reference in New Issue
Block a user