You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered:
thelem
changed the title
[PropertyAccessor]
[PropertyAccessor] Original exception not always passed to throwUnexpectedTypeException
Oct 18, 2020
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
The text was updated successfully, but these errors were encountered: