Skip to content

Silent except hiding real failures #97

@pmaasz

Description

@pmaasz

src/aberrations.py:361:

try:
    ...
except Exception:
    return 0

Spherical aberration silently returns 0 on any failure. That's worse than crashing — the UI will report a beautiful diffraction‑limited lens when in fact ray tracing blew up with a NaN.

The agent scan found ~16 similar handlers, with the worst concentrated in lens.py, aberrations.py, tolerancing.py, and (dead) gui_controllers.py. At minimum convert each to except Exception as e: logger.exception(...); return None. A None that propagates is far easier to debug than a plausible‑looking zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions