Skip to content

Commit

Permalink
Fixes mockito#2692 : Misleading error message
Browse files Browse the repository at this point in the history
- changes suggestion to get assistance from mailing list to GitHub
  • Loading branch information
dstango committed Jun 25, 2022
1 parent 558f59b commit 2bdc29c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -219,14 +219,14 @@ private Object readResolve() throws ObjectStreamException {
+ typeToMock.getCanonicalName()
+ "'. The error was :",
" " + ioe.getMessage(),
"If you are unsure what is the reason of this exception, feel free to contact us on the mailing list."),
"If you are unsure what is the reason of this exception, feel free to open an issue on GitHub."),
ioe);
} catch (ClassNotFoundException cce) {
throw new MockitoSerializationIssue(
join(
"A class couldn't be found while deserializing a Mockito mock, you should check your classpath. The error was :",
" " + cce.getMessage(),
"If you are still unsure what is the reason of this exception, feel free to contact us on the mailing list."),
"If you are still unsure what is the reason of this exception, feel free to open an issue on GitHub."),
cce);
}
}
Expand Down
Expand Up @@ -434,7 +434,7 @@ private <T> RuntimeException prettifyFailure(
join(
"Mockito cannot mock this class: " + mockFeatures.getTypeToMock() + ".",
"",
"If you're not sure why you're getting this error, please report to the mailing list.",
"If you're not sure why you're getting this error, please open an issue on GitHub.",
"",
Platform.warnForVM(
"IBM J9 VM",
Expand Down
Expand Up @@ -116,7 +116,7 @@ private <T> RuntimeException prettifyFailure(
"",
"Mockito can only mock non-private & non-final classes, but the root cause of this error might be different.",
"Please check the full stacktrace to understand what the issue is.",
"If you're not sure why you're getting this error, please report to the mailing list.",
"If you're still not sure why you're getting this error, please open an issue on GitHub.",
"",
Platform.warnForVM(
"IBM J9 VM",
Expand Down
Expand Up @@ -93,7 +93,7 @@ public InternalRunner create(Class<?> klass, Supplier<MockitoTestListener> liste
+ "MockitoRunner can only be used with JUnit 4.5 or higher.\n"
+ "You can upgrade your JUnit version or write your own Runner (please consider contributing your runner to the Mockito community).\n"
+ "Bear in mind that you can still enjoy all features of the framework without using runners (they are completely optional).\n"
+ "If you get this error despite using JUnit 4.5 or higher then please report this error to the mockito mailing list.\n",
+ "If you get this error despite using JUnit 4.5 or higher, then please open an issue on GitHub.\n",
t);
}
}
Expand Down

0 comments on commit 2bdc29c

Please sign in to comment.