Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on Sep 2, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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.

  2. spring-projects-issues commented on Sep 13, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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.

  3. spring-projects-issues commented on Sep 15, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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...

  4. added
    type: regression
    status: backported
    in: core
    on Jan 11, 2019
  5. added this to the 4.3.3 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: corestatus: backportedtype: regression

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions