Skip to content

gui: Actually raise GExceptions in iscatt_core#7659

Merged
echoix merged 2 commits into
OSGeo:mainfrom
echoix:raise-GException
Jul 12, 2026
Merged

gui: Actually raise GExceptions in iscatt_core#7659
echoix merged 2 commits into
OSGeo:mainfrom
echoix:raise-GException

Conversation

@echoix

@echoix echoix commented Jul 9, 2026

Copy link
Copy Markdown
Member

Some code in iscatt was not raising the exception it was creating. Thus, it was not having any effect.

Here is the PR text for one of the fixes that was generated by AI. I did the others.

General fix: when an error condition is detected, raise the exception instead of just constructing it.

Best fix here: in gui/wxpython/iscatt/iscatt_core.py, inside CatRastUpdater._updateCatRast, change line 277 from:

  • GException(_("Patching category raster conditions file failed.")) to:
  • raise GException(_("Patching category raster conditions file failed."))

This preserves intended functionality (error reporting via GException) while ensuring the failure is not silently ignored. No new imports, methods, or definitions are required.

Some code in iscatt was not raising the exception it was creating.
Thus, it was not having any effect.

Here is the PR text for one of the fixes that was generated by AI. I
did the others.
General fix: when an error condition is detected, **raise** the
exception instead of just constructing it.

Best fix here: in `gui/wxpython/iscatt/iscatt_core.py`, inside
`CatRastUpdater._updateCatRast`, change line 277 from:
- `GException(_("Patching category raster conditions file failed."))`
to:
- `raise GException(_("Patching category raster conditions file
failed."))`

This preserves intended functionality (error reporting via
`GException`) while ensuring the failure is not silently ignored. No
new imports, methods, or definitions are required.
@echoix echoix requested review from ninsbl and petrasovaa July 9, 2026 20:02
@github-actions github-actions Bot added GUI wxGUI related Python Related code is in Python labels Jul 9, 2026
Comment thread gui/wxpython/iscatt/core_c.py Outdated
Comment thread gui/wxpython/iscatt/iscatt_core.py Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@echoix echoix enabled auto-merge (squash) July 10, 2026 12:28
@echoix echoix merged commit c80a5d3 into OSGeo:main Jul 12, 2026
26 checks passed
@echoix echoix deleted the raise-GException branch July 12, 2026 08:27
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 12, 2026
echoix added a commit to echoix-org/grass that referenced this pull request Jul 12, 2026
* gui: Actually raise GExceptions in iscatt_core

Some code in iscatt was not raising the exception it was creating.
Thus, it was not having any effect.

Here is the PR text for one of the fixes that was generated by AI. I
did the others.
General fix: when an error condition is detected, **raise** the
exception instead of just constructing it.

Best fix here: in `gui/wxpython/iscatt/iscatt_core.py`, inside
`CatRastUpdater._updateCatRast`, change line 277 from:
- `GException(_("Patching category raster conditions file failed."))`
to:
- `raise GException(_("Patching category raster conditions file
failed."))`

This preserves intended functionality (error reporting via
`GException`) while ensuring the failure is not silently ignored. No
new imports, methods, or definitions are required.

* Apply suggestions from code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI wxGUI related Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants