Skip to content

Commit

Permalink
Fixes mockito#2692 : Misleading error message
Browse files Browse the repository at this point in the history
- makes the proposed error reason less narrow
- points to check the stack trace
  • Loading branch information
dstango committed Jun 25, 2022
1 parent 70e16dc commit 558f59b
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -114,7 +114,8 @@ private <T> RuntimeException prettifyFailure(
join(
"Mockito cannot mock this class: " + mockFeatures.getTypeToMock() + ".",
"",
"Mockito can only mock non-private & non-final classes.",
"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.",
"",
Platform.warnForVM(
Expand Down

0 comments on commit 558f59b

Please sign in to comment.