Test for missing data entry - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: Test for missing data entry (/Thread-Test-for-missing-data-entry) |
Test for missing data entry - david - 12-20-2024 Another of my stupid questions!!! In my website photos plug-in, if I test for missing data input, how do I get it to print only my gimp message and exit. I have been searching for this all day and tried numerous things without success. Most of the things I have tried add additional error messages. David. RE: Test for missing data entry - teapot - 12-20-2024 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: 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: You could try this in gimp's python console: Filters -> Python-Fu -> Console Code: all_err = ['abc', 'def', 'ghi'] You should get this: [attachment=12823] RE: Test for missing data entry - Ofnuts - 12-20-2024 (12-20-2024, 05:17 PM)david Wrote: Another of my stupid questions!!! If you exit properly there shouldn't be any. My plugins are usually architected like this: Code: import traceback |