Skip to content

Error thrown during destroy method should be logged #19539

@Woodz

Description

@Woodz

Scenario: spring-boot-starter-parent v2.2.1.RELEASE
Method on @component class 'Foo' annotated with @PreDestroy throws an ExceptionInInitializerExceptionError

Expected:
Logs to contain exception message and stack trace to easily identify the cause of the exception

Actual:
Logs only contain "Destroy method on bean with name 'foo' threw an exception: java.lang.ExceptionInInitializerExceptionError" without any further details

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions