Skip to content

Remove BaseException Uses #7401

Closed
Closed

Description

@ericspod

Describe the bug
BaseException is being caught in places and it's not clear this should be done or is appropriate. Bugbear is not complaining about it as B036 as shown in #7397. Should these be replaced with just Exception? It's not documented anywhere if there's an explicit reason to not do this.

Activity

  1. AlexanderSanin commented on May 18, 2026

    @AlexanderSanin
    Contributor

    Hi @ericspod , I've submitted a PR to address this issue: #8859. It replaces all 17 occurrences of except BaseException with except Exception across monai/ and tests/. Happy to adjust if needed.

  2. added a commit that references this issue on May 19, 2026
    286e905
  3. added a commit that references this issue on May 25, 2026
    70669c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions