Skip to content

TypeConverterSupport does not propagate custom exceptions anymore [SPR-14661] #19225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Sep 2, 2016 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: regression A bug that is also a regression
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Sep 2, 2016

Valentin Tsvetkov opened SPR-14661 and commented

catch (Throwable ex) on line 77 in TypeConverterSupport. In SpringBoot application we can't properly use @ControllerAdvice because our specific exception that we throw in converter catches in TypeConverterSupport and instead it throws TypeMismatchException.


Affects: 4.2.7

Issue Links:

Referenced from: commits c69e6a3, 73bbe08, 883c3a6

Backported to: 4.2.8

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Sep 2, 2016

Juergen Hoeller commented

This seems to be a consequence of the fix in #18917 and therefore a regression. We'll revisit this for 4.2.8 / 4.3.3, possibly enumerating all actual type-mismatch-like exceptions there.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Sep 13, 2016

Juergen Hoeller commented

I've revised the fix for #18917 such that it only applies to Formatter.parse invocations, not to general conversion attempts. Specifically, TypeConverterSupport just catches IllegalArgumentException again but FormatterPropertyEditorAdapter turns any exception into an IllegalArgumentException if necessary now.

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

It would be great if you could give the latest 4.2.8.BUILD-SNAPSHOT or 4.3.3.BUILD-SNAPSHOT a try to check whether it works for you again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

2 participants