Convert exception to message box.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 21 Jun 2019 21:47:10 +0000 (23:47 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 21 Jun 2019 21:47:10 +0000 (23:47 +0200)
gimp_passport_plugin.py

index 486ed28..8b6f92a 100755 (executable)
@@ -16,7 +16,8 @@ def create_passport(image, drawable, paper_height_mm, paper_width_mm):
     # get face extent
     non_empty, left, top, right, bottom = pdb.gimp_selection_bounds(image)
     if not non_empty:
-        raise RuntimeError('Please select the face first.')
+        pdb.gimp_message('Please select the face first.')
+        return image
 
     # pdb.gimp_image_find_next_guide(image, 0)
     # pdb.gimp_image_get_guide_orientation(image, 6)