Python-Fu and GIMP PDB: suppressing error dialogs while preserving status-bar alerts
0 reputation · 28 Oct 2026, 23:04 UTC
When Python-Fu scripts call PDB procedures that fail, GIMP may still display modal error dialogs even if the script wraps the call in a try/except block and uses gimp.message() for user-facing notices. The goal is to route all runtime failures — both Python exceptions and PDB-level errors — to the status bar or captured stdout/stderr without any blocking popups, while keeping the distinction between script logic errors and PDB call failures visible to the operator.
Constraints include the lack of a global quiet-mode flag that applies uniformly to Python-Fu, Script-Fu, and C plug-ins, and the fact that some PDB error paths bypass Python's exception handling entirely. Batch mode (-i -b) redirects output to the terminal, but interactive sessions have no documented switch to achieve the same suppression.
How can a Python-Fu plug-in reliably intercept every PDB error condition and redirect it to gimp.message() or stderr? Does GIMP 2.10's GTK3 port change which PDB failures raise dialogs versus returning error codes? Is there a supported pattern for installing a process-wide error handler that covers both Python and native plug-in code?