Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test for missing data entry
#2
If you make a variable, say called err, that's a string containing an error message you can do this near the start of your python_website_photos1 function:

Code:
    if err:
        pdb.gimp_message(err)
        return

The return stops your plugin from running.

Or perhaps you could have the error messages in a list, say called all_err, of strings. Then you could do:

Code:
    if all_err:
        pdb.gimp_message('\n'.join(all_err))
        return

You could try this in gimp's python console:
Filters -> Python-Fu -> Console

Code:
all_err = ['abc', 'def', 'ghi']
pdb.gimp_message('\n'.join(all_err))

You should get this:

   
Reply


Messages In This Thread
Test for missing data entry - by david - 12-20-2024, 05:17 PM
RE: Test for missing data entry - by teapot - 12-20-2024, 06:51 PM
RE: Test for missing data entry - by Ofnuts - 12-20-2024, 08:26 PM

Forum Jump: