Skip to content

Commit

Permalink
Include cause when FieldReader fails to access field
Browse files Browse the repository at this point in the history
Fixes #2266
  • Loading branch information
A248 committed Apr 14, 2021
1 parent 2fa2a63 commit 37e96c7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -30,7 +30,7 @@ public Object read() {
return accessor.get(field, target);
} catch (Exception e) {
throw new MockitoException(
"Cannot read state from field: " + field + ", on instance: " + target);
"Cannot read state from field: " + field + ", on instance: " + target, e);
}
}
}

0 comments on commit 37e96c7

Please sign in to comment.