Skip to content

Commit

Permalink
Polish exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Oct 16, 2024
1 parent effe606 commit ac458be
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ protected Object createOverrideInstance(String beanName, @Nullable BeanDefinitio
return this.factoryMethod.invoke(null);
}
catch (IllegalAccessException | InvocationTargetException ex) {
throw new IllegalStateException("Failed to invoke bean overriding method " + this.factoryMethod.getName() +
"; a static method with no formal parameters is expected", ex);
throw new IllegalStateException(
"Failed to invoke @TestBean factory method: " + this.factoryMethod, ex);
}
}

Expand Down

0 comments on commit ac458be

Please sign in to comment.