Description
#18210 introduced throwUnexpectedTypeException()
#34899 extended this to wrap the original exception, and passed the original exception while inside the setValue function
However, by the time this came to be merged into 4.3:
7f2d9c2
there were two calls to throwUnexpectedTypeException, and only one of them was given the original exception. It should be passed in both calls.
The benefit is as described by @Pictor13 on #34899
In my case I was passing null to a setter that was typed not to accept nulls, even though it was backed on to a nullable field. The error message I was shown made me look at my field definition, when in fact I needed to look at the setter.
Example
Screenshot of stacktrace after changing the call to pass the original exception
