Skip to content

Allow Python to catch errors #38

Open

Description

@Leengit

The current use of itkAssertOrThrowMacro to report errors, such as inputs that cannot be processed, is not caught by a Python try-except block. We want a solution where the Python program can recover from these errors.

Activity

  1. andreped commented on Jun 6, 2022

    @andreped

    That would be a great feature. I was looking into using ITKColorNormalization in my DP workflows, but I was unable to as it seemed to crash too often, with no simple way to catch these errors, as fair as I remember.

    I could test a proposed solution in a typical workflow when it is ready.

  2. Leengit commented on Jul 4, 2022

    @Leengit
    CollaboratorAuthor

    InsightSoftwareConsortium/ITK#3479 should fix this issue. However, I nonetheless recommend that we use if (!success) { itkGenericExceptionMacro(message); } to replace itkAssertOrThrowMacro(success, message); in ITKColorNormalization code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions