Skip to content

[BUG] Bare except: blocks in original algorithm implementations #166

@Devguru-codes

Description

@Devguru-codes

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

All 14 bare except: blocks catch every exception including KeyboardInterrupt, SystemExit, MemoryError, etc. This:

  1. Makes debugging impossible - errors are silently swallowed
  2. Violates PEP 8 ("Never use a bare except:")
  3. Hides real bugs (e.g. TypeError, ValueError from bad input)

Screenshots [optional]

No response

Steps To Reproduce

  • src/original/fitting/OGC_AmsterdamUMC/LSQ_fitting.py -13 occurrences
  • src/original/fitting/PV_MUMC/triexp_fitting_algorithms.py -1 occurrence

Expected behavior

Help in debugging the errors

Additional context

Replacing each bare except: with the most specific exception type(s) that the try block can raise.

Are you working on this?

Yes

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