diff --git a/src/main/java/junitparams/internal/parameters/ParamsFromMethodCommon.java b/src/main/java/junitparams/internal/parameters/ParamsFromMethodCommon.java index f26537c..e14aece 100644 --- a/src/main/java/junitparams/internal/parameters/ParamsFromMethodCommon.java +++ b/src/main/java/junitparams/internal/parameters/ParamsFromMethodCommon.java @@ -87,11 +87,11 @@ private Object[] invokeParamsProvidingMethod(Method provideMethod, Class sour } catch (ClassCastException e) { throw new RuntimeException( - "The return type of: " + provideMethod.getName() + " defined in class " + sourceClass + + "The return type of: " + provideMethod.getName() + " defined in " + sourceClass + " should be one of the following:\nObject[][], Iterable, Iterable>," + " Iterator.\nFix it!", e); } catch (Exception e) { - throw new RuntimeException("Could not invoke method: " + provideMethod.getName() + " defined in class " + + throw new RuntimeException("Could not invoke method: " + provideMethod.getName() + " defined in " + sourceClass + " so no params were used.", e); } }