Index: app/xcf/xcf.c
===================================================================
--- app/xcf/xcf.c	(revision 26587)
+++ app/xcf/xcf.c	(working copy)
@@ -330,7 +330,8 @@ xcf_load_invoker (GimpProcedure      *pr
                    gimp_filename_to_utf8 (filename), g_strerror (save_errno));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success,
+                                                  error ? *error : NULL);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], image);
@@ -422,7 +423,8 @@ xcf_save_invoker (GimpProcedure      *pr
                    gimp_filename_to_utf8 (filename), g_strerror (save_errno));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success,
+                                                  error ? *error : NULL);
 
   gimp_unset_busy (gimp);
 
Index: app/pdb/palette-select-cmds.c
===================================================================
--- app/pdb/palette-select-cmds.c	(revision 26587)
+++ app/pdb/palette-select-cmds.c	(working copy)
@@ -61,7 +61,7 @@ palettes_popup_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -86,7 +86,7 @@ palettes_close_popup_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -114,7 +114,7 @@ palettes_set_popup_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/brushes-cmds.c
===================================================================
--- app/pdb/brushes-cmds.c	(revision 26587)
+++ app/pdb/brushes-cmds.c	(working copy)
@@ -50,7 +50,7 @@ brushes_refresh_invoker (GimpProcedure  
 {
   gimp_data_factory_data_refresh (gimp->brush_factory);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -75,7 +75,7 @@ brushes_get_list_invoker (GimpProcedure 
                                                            filter, &num_brushes);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -113,7 +113,7 @@ brushes_get_brush_invoker (GimpProcedure
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -145,7 +145,7 @@ brushes_get_spacing_invoker (GimpProcedu
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], spacing);
@@ -171,7 +171,7 @@ brushes_set_spacing_invoker (GimpProcedu
       gimp_brush_set_spacing (gimp_context_get_brush (context), spacing);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -220,7 +220,7 @@ brushes_get_brush_data_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/gimppdberror.h
===================================================================
--- app/pdb/gimppdberror.h	(revision 26587)
+++ app/pdb/gimppdberror.h	(working copy)
@@ -23,7 +23,9 @@
 typedef enum
 {
   GIMP_PDB_PROCEDURE_NOT_FOUND,
-  GIMP_PDB_INVALID_ARGUMENT
+  GIMP_PDB_INVALID_ARGUMENT,
+  GIMP_PDB_INTERNAL_ERROR,
+  GIMP_PDB_CALL_CANCELLED
 } GimpPdbErrorCode;
 
 
Index: app/pdb/paths-cmds.c
===================================================================
--- app/pdb/paths-cmds.c	(revision 26587)
+++ app/pdb/paths-cmds.c	(working copy)
@@ -67,7 +67,7 @@ path_list_invoker (GimpProcedure      *p
       path_list = gimp_container_get_name_array (image->vectors, &num_paths);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -103,7 +103,7 @@ path_get_current_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -136,7 +136,7 @@ path_set_current_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -164,7 +164,7 @@ path_delete_invoker (GimpProcedure      
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -228,7 +228,7 @@ path_get_points_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -304,7 +304,7 @@ path_set_points_invoker (GimpProcedure  
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -341,7 +341,7 @@ path_stroke_current_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -416,7 +416,7 @@ path_get_point_at_dist_invoker (GimpProc
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -455,7 +455,7 @@ path_get_tattoo_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], tattoo);
@@ -490,7 +490,7 @@ path_set_tattoo_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -520,7 +520,7 @@ get_path_by_tattoo_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -555,7 +555,7 @@ path_get_locked_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], locked);
@@ -590,7 +590,7 @@ path_set_locked_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -636,7 +636,7 @@ path_to_selection_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -664,7 +664,7 @@ path_import_invoker (GimpProcedure      
                                           merge, scale, -1, NULL, NULL);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/gradients-cmds.c
===================================================================
--- app/pdb/gradients-cmds.c	(revision 26587)
+++ app/pdb/gradients-cmds.c	(working copy)
@@ -49,7 +49,7 @@ gradients_refresh_invoker (GimpProcedure
 {
   gimp_data_factory_data_refresh (gimp->gradient_factory);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -74,7 +74,7 @@ gradients_get_list_invoker (GimpProcedur
                                                               filter, &num_gradients);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -134,7 +134,7 @@ gradients_sample_uniform_invoker (GimpPr
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -192,7 +192,7 @@ gradients_sample_custom_invoker (GimpPro
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -269,7 +269,7 @@ gradients_get_gradient_data_invoker (Gim
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/palettes-cmds.c
===================================================================
--- app/pdb/palettes-cmds.c	(revision 26587)
+++ app/pdb/palettes-cmds.c	(working copy)
@@ -51,7 +51,7 @@ palettes_refresh_invoker (GimpProcedure 
 {
   gimp_data_factory_data_refresh (gimp->palette_factory);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -76,7 +76,7 @@ palettes_get_list_invoker (GimpProcedure
                                                              filter, &num_palettes);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -110,7 +110,7 @@ palettes_get_palette_invoker (GimpProced
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -166,7 +166,7 @@ palettes_get_palette_entry_invoker (Gimp
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/drawable-cmds.c
===================================================================
--- app/pdb/drawable-cmds.c	(revision 26587)
+++ app/pdb/drawable-cmds.c	(working copy)
@@ -68,7 +68,7 @@ drawable_is_valid_invoker (GimpProcedure
   valid = (GIMP_IS_DRAWABLE (drawable) &&
            ! gimp_item_is_removed (GIMP_ITEM (drawable)));
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_boolean (&return_vals->values[1], valid);
 
   return return_vals;
@@ -94,7 +94,7 @@ drawable_is_layer_invoker (GimpProcedure
       layer = GIMP_IS_LAYER (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], layer);
@@ -122,7 +122,7 @@ drawable_is_text_layer_invoker (GimpProc
       text_layer = gimp_drawable_is_text_layer (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], text_layer);
@@ -150,7 +150,7 @@ drawable_is_layer_mask_invoker (GimpProc
       layer_mask = GIMP_IS_LAYER_MASK (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], layer_mask);
@@ -178,7 +178,7 @@ drawable_is_channel_invoker (GimpProcedu
       channel = GIMP_IS_CHANNEL (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], channel);
@@ -206,7 +206,7 @@ drawable_type_invoker (GimpProcedure    
       type = gimp_drawable_type (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], type);
@@ -234,7 +234,7 @@ drawable_type_with_alpha_invoker (GimpPr
       type_with_alpha = gimp_drawable_type_with_alpha (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], type_with_alpha);
@@ -262,7 +262,7 @@ drawable_has_alpha_invoker (GimpProcedur
       has_alpha = gimp_drawable_has_alpha (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], has_alpha);
@@ -290,7 +290,7 @@ drawable_is_rgb_invoker (GimpProcedure  
       is_rgb = gimp_drawable_is_rgb (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], is_rgb);
@@ -318,7 +318,7 @@ drawable_is_gray_invoker (GimpProcedure 
       is_gray = gimp_drawable_is_gray (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], is_gray);
@@ -346,7 +346,7 @@ drawable_is_indexed_invoker (GimpProcedu
       is_indexed = gimp_drawable_is_indexed (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], is_indexed);
@@ -374,7 +374,7 @@ drawable_bpp_invoker (GimpProcedure     
       bpp = gimp_drawable_bytes (drawable);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], bpp);
@@ -402,7 +402,7 @@ drawable_width_invoker (GimpProcedure   
       width = gimp_item_width (GIMP_ITEM (drawable));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], width);
@@ -430,7 +430,7 @@ drawable_height_invoker (GimpProcedure  
       height = gimp_item_height (GIMP_ITEM (drawable));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], height);
@@ -459,7 +459,7 @@ drawable_offsets_invoker (GimpProcedure 
       gimp_item_offsets (GIMP_ITEM (drawable), &offset_x, &offset_y);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -494,7 +494,7 @@ drawable_delete_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -517,7 +517,7 @@ drawable_get_image_invoker (GimpProcedur
       image = gimp_item_get_image (GIMP_ITEM (drawable));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], image);
@@ -546,7 +546,7 @@ drawable_set_image_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -569,7 +569,7 @@ drawable_get_name_invoker (GimpProcedure
       name = g_strdup (gimp_object_get_name (GIMP_OBJECT (drawable)));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -597,7 +597,7 @@ drawable_set_name_invoker (GimpProcedure
       success = gimp_item_rename (GIMP_ITEM (drawable), name, error);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -620,7 +620,7 @@ drawable_get_visible_invoker (GimpProced
       visible = gimp_item_get_visible (GIMP_ITEM (drawable));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], visible);
@@ -648,7 +648,7 @@ drawable_set_visible_invoker (GimpProced
       gimp_item_set_visible (GIMP_ITEM (drawable), visible, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -671,7 +671,7 @@ drawable_get_linked_invoker (GimpProcedu
       linked = gimp_item_get_linked (GIMP_ITEM (drawable));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], linked);
@@ -699,7 +699,7 @@ drawable_set_linked_invoker (GimpProcedu
       gimp_item_set_linked (GIMP_ITEM (drawable), linked, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -722,7 +722,7 @@ drawable_get_tattoo_invoker (GimpProcedu
       tattoo = gimp_item_get_tattoo (GIMP_ITEM (drawable));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_uint (&return_vals->values[1], tattoo);
@@ -750,7 +750,7 @@ drawable_set_tattoo_invoker (GimpProcedu
       gimp_item_set_tattoo (GIMP_ITEM (drawable), tattoo);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -777,7 +777,7 @@ drawable_mask_bounds_invoker (GimpProced
       non_empty = gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -815,7 +815,7 @@ drawable_mask_intersect_invoker (GimpPro
       non_empty = gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -859,7 +859,7 @@ drawable_merge_shadow_invoker (GimpProce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -884,7 +884,7 @@ drawable_free_shadow_invoker (GimpProced
       gimp_drawable_free_shadow_tiles (drawable);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -913,7 +913,7 @@ drawable_update_invoker (GimpProcedure  
       gimp_drawable_update (drawable, x, y, width, height);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -965,7 +965,7 @@ drawable_get_pixel_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1024,7 +1024,7 @@ drawable_set_pixel_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1047,7 +1047,7 @@ drawable_fill_invoker (GimpProcedure    
       gimp_drawable_fill_by_type (drawable, context, (GimpFillType) fill_type);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1080,7 +1080,7 @@ drawable_offset_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1147,7 +1147,7 @@ drawable_thumbnail_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1229,7 +1229,7 @@ drawable_sub_thumbnail_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1268,7 +1268,7 @@ drawable_foreground_extract_invoker (Gim
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/brush-cmds.c
===================================================================
--- app/pdb/brush-cmds.c	(revision 26587)
+++ app/pdb/brush-cmds.c	(working copy)
@@ -65,7 +65,7 @@ brush_new_invoker (GimpProcedure      *p
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], actual_name);
@@ -107,7 +107,7 @@ brush_duplicate_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], copy_name);
@@ -140,7 +140,7 @@ brush_is_generated_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], generated);
@@ -178,7 +178,7 @@ brush_rename_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], actual_name);
@@ -211,7 +211,7 @@ brush_delete_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -239,7 +239,7 @@ brush_is_editable_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], editable);
@@ -280,7 +280,7 @@ brush_get_info_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -341,7 +341,7 @@ brush_get_pixels_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -383,7 +383,7 @@ brush_get_spacing_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], spacing);
@@ -416,7 +416,7 @@ brush_set_spacing_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -444,7 +444,7 @@ brush_get_shape_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], shape);
@@ -483,7 +483,7 @@ brush_set_shape_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], shape_out);
@@ -516,7 +516,7 @@ brush_get_radius_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], radius);
@@ -555,7 +555,7 @@ brush_set_radius_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], radius_out);
@@ -588,7 +588,7 @@ brush_get_spikes_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], spikes);
@@ -627,7 +627,7 @@ brush_set_spikes_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], spikes_out);
@@ -660,7 +660,7 @@ brush_get_hardness_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], hardness);
@@ -699,7 +699,7 @@ brush_set_hardness_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], hardness_out);
@@ -732,7 +732,7 @@ brush_get_aspect_ratio_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], aspect_ratio);
@@ -771,7 +771,7 @@ brush_set_aspect_ratio_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], aspect_ratio_out);
@@ -804,7 +804,7 @@ brush_get_angle_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], angle);
@@ -843,7 +843,7 @@ brush_set_angle_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], angle_out);
Index: app/pdb/font-select-cmds.c
===================================================================
--- app/pdb/font-select-cmds.c	(revision 26587)
+++ app/pdb/font-select-cmds.c	(working copy)
@@ -59,7 +59,7 @@ fonts_popup_invoker (GimpProcedure      
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -83,7 +83,7 @@ fonts_close_popup_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -110,7 +110,7 @@ fonts_set_popup_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/floating-sel-cmds.c
===================================================================
--- app/pdb/floating-sel-cmds.c	(revision 26587)
+++ app/pdb/floating-sel-cmds.c	(working copy)
@@ -66,7 +66,7 @@ floating_sel_remove_invoker (GimpProcedu
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -97,7 +97,7 @@ floating_sel_anchor_invoker (GimpProcedu
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -128,7 +128,7 @@ floating_sel_to_layer_invoker (GimpProce
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -154,7 +154,7 @@ floating_sel_attach_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -187,7 +187,7 @@ floating_sel_rigor_invoker (GimpProcedur
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -220,7 +220,7 @@ floating_sel_relax_invoker (GimpProcedur
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/fonts-cmds.c
===================================================================
--- app/pdb/fonts-cmds.c	(revision 26587)
+++ app/pdb/fonts-cmds.c	(working copy)
@@ -45,7 +45,7 @@ fonts_refresh_invoker (GimpProcedure    
 {
   gimp_fonts_load (gimp);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -70,7 +70,7 @@ fonts_get_list_invoker (GimpProcedure   
                                                           filter, &num_fonts);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/drawable-transform-cmds.c
===================================================================
--- app/pdb/drawable-transform-cmds.c	(revision 26587)
+++ app/pdb/drawable-transform-cmds.c	(working copy)
@@ -81,7 +81,7 @@ drawable_transform_flip_simple_invoker (
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -157,7 +157,7 @@ drawable_transform_flip_invoker (GimpPro
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -231,7 +231,7 @@ drawable_transform_flip_default_invoker 
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -317,7 +317,7 @@ drawable_transform_perspective_invoker (
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -401,7 +401,7 @@ drawable_transform_perspective_default_i
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -449,7 +449,7 @@ drawable_transform_rotate_simple_invoker
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -529,7 +529,7 @@ drawable_transform_rotate_invoker (GimpP
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -607,7 +607,7 @@ drawable_transform_rotate_default_invoke
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -684,7 +684,7 @@ drawable_transform_scale_invoker (GimpPr
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -759,7 +759,7 @@ drawable_transform_scale_default_invoker
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -832,7 +832,7 @@ drawable_transform_shear_invoker (GimpPr
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -903,7 +903,7 @@ drawable_transform_shear_default_invoker
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -987,7 +987,7 @@ drawable_transform_2d_invoker (GimpProce
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -1069,7 +1069,7 @@ drawable_transform_2d_default_invoker (G
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -1161,7 +1161,7 @@ drawable_transform_matrix_invoker (GimpP
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -1251,7 +1251,7 @@ drawable_transform_matrix_default_invoke
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
Index: app/pdb/text-layer-cmds.c
===================================================================
--- app/pdb/text-layer-cmds.c	(revision 26587)
+++ app/pdb/text-layer-cmds.c	(working copy)
@@ -93,7 +93,7 @@ text_layer_new_invoker (GimpProcedure   
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -130,7 +130,7 @@ text_layer_get_text_invoker (GimpProcedu
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], text);
@@ -168,7 +168,7 @@ text_layer_set_text_invoker (GimpProcedu
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -200,7 +200,7 @@ text_layer_get_font_invoker (GimpProcedu
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], font);
@@ -238,7 +238,7 @@ text_layer_set_font_invoker (GimpProcedu
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -272,7 +272,7 @@ text_layer_get_font_size_invoker (GimpPr
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -316,7 +316,7 @@ text_layer_set_font_size_invoker (GimpPr
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -350,7 +350,7 @@ text_layer_get_hinting_invoker (GimpProc
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -394,7 +394,7 @@ text_layer_set_hinting_invoker (GimpProc
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -426,7 +426,7 @@ text_layer_get_antialias_invoker (GimpPr
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], antialias);
@@ -464,7 +464,7 @@ text_layer_set_antialias_invoker (GimpPr
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -496,7 +496,7 @@ text_layer_get_kerning_invoker (GimpProc
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], kerning);
@@ -534,7 +534,7 @@ text_layer_set_kerning_invoker (GimpProc
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -566,7 +566,7 @@ text_layer_get_language_invoker (GimpPro
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], language);
@@ -604,7 +604,7 @@ text_layer_set_language_invoker (GimpPro
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -636,7 +636,7 @@ text_layer_get_base_direction_invoker (G
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], direction);
@@ -674,7 +674,7 @@ text_layer_set_base_direction_invoker (G
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -706,7 +706,7 @@ text_layer_get_justification_invoker (Gi
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], justify);
@@ -744,7 +744,7 @@ text_layer_set_justification_invoker (Gi
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -774,7 +774,7 @@ text_layer_get_color_invoker (GimpProced
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_rgb (&return_vals->values[1], &color);
@@ -812,7 +812,7 @@ text_layer_set_color_invoker (GimpProced
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -844,7 +844,7 @@ text_layer_get_indent_invoker (GimpProce
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], indent);
@@ -882,7 +882,7 @@ text_layer_set_indent_invoker (GimpProce
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -914,7 +914,7 @@ text_layer_get_line_spacing_invoker (Gim
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], line_spacing);
@@ -952,7 +952,7 @@ text_layer_set_line_spacing_invoker (Gim
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -984,7 +984,7 @@ text_layer_get_letter_spacing_invoker (G
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], letter_spacing);
@@ -1022,7 +1022,7 @@ text_layer_set_letter_spacing_invoker (G
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/palette-cmds.c
===================================================================
--- app/pdb/palette-cmds.c	(revision 26587)
+++ app/pdb/palette-cmds.c	(working copy)
@@ -65,7 +65,7 @@ palette_new_invoker (GimpProcedure      
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], actual_name);
@@ -107,7 +107,7 @@ palette_duplicate_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], copy_name);
@@ -145,7 +145,7 @@ palette_rename_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], actual_name);
@@ -178,7 +178,7 @@ palette_delete_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -206,7 +206,7 @@ palette_is_editable_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], editable);
@@ -239,7 +239,7 @@ palette_get_info_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], num_colors);
@@ -284,7 +284,7 @@ palette_get_colors_invoker (GimpProcedur
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -320,7 +320,7 @@ palette_get_columns_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], num_columns);
@@ -353,7 +353,7 @@ palette_set_columns_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -390,7 +390,7 @@ palette_add_entry_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], entry_num);
@@ -432,7 +432,7 @@ palette_delete_entry_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -471,7 +471,7 @@ palette_entry_get_color_invoker (GimpPro
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_rgb (&return_vals->values[1], &color);
@@ -517,7 +517,7 @@ palette_entry_set_color_invoker (GimpPro
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -556,7 +556,7 @@ palette_entry_get_name_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], entry_name);
@@ -603,7 +603,7 @@ palette_entry_set_name_invoker (GimpProc
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/progress-cmds.c
===================================================================
--- app/pdb/progress-cmds.c	(revision 26587)
+++ app/pdb/progress-cmds.c	(working copy)
@@ -63,7 +63,7 @@ progress_init_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -92,7 +92,7 @@ progress_update_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -114,7 +114,7 @@ progress_pulse_invoker (GimpProcedure   
   else
     success = FALSE;
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -143,7 +143,7 @@ progress_set_text_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -166,7 +166,7 @@ progress_end_invoker (GimpProcedure     
   else
     success = FALSE;
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -191,7 +191,7 @@ progress_get_window_handle_invoker (Gimp
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], window);
@@ -222,7 +222,7 @@ progress_install_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -248,7 +248,7 @@ progress_uninstall_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -274,7 +274,7 @@ progress_cancel_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/parasite-cmds.c
===================================================================
--- app/pdb/parasite-cmds.c	(revision 26587)
+++ app/pdb/parasite-cmds.c	(working copy)
@@ -60,7 +60,7 @@ parasite_find_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_boxed (&return_vals->values[1], parasite);
@@ -86,7 +86,7 @@ parasite_attach_invoker (GimpProcedure  
       gimp_parasite_attach (gimp, parasite);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -107,7 +107,7 @@ parasite_detach_invoker (GimpProcedure  
       gimp_parasite_detach (gimp, name);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -124,7 +124,7 @@ parasite_list_invoker (GimpProcedure    
 
   parasites = gimp_parasite_list (gimp, &num_parasites);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
   g_value_set_int (&return_vals->values[1], num_parasites);
   gimp_value_take_stringarray (&return_vals->values[2], parasites, num_parasites);
@@ -157,7 +157,7 @@ image_parasite_find_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_boxed (&return_vals->values[1], parasite);
@@ -185,7 +185,7 @@ image_parasite_attach_invoker (GimpProce
       gimp_image_parasite_attach (image, parasite);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -208,7 +208,7 @@ image_parasite_detach_invoker (GimpProce
       gimp_image_parasite_detach (image, name);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -232,7 +232,7 @@ image_parasite_list_invoker (GimpProcedu
       parasites = gimp_image_parasite_list (image, &num_parasites);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -269,7 +269,7 @@ drawable_parasite_find_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_boxed (&return_vals->values[1], parasite);
@@ -297,7 +297,7 @@ drawable_parasite_attach_invoker (GimpPr
       gimp_item_parasite_attach (GIMP_ITEM (drawable), parasite);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -320,7 +320,7 @@ drawable_parasite_detach_invoker (GimpPr
       gimp_item_parasite_detach (GIMP_ITEM (drawable), name);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -344,7 +344,7 @@ drawable_parasite_list_invoker (GimpProc
       parasites = gimp_item_parasite_list (GIMP_ITEM (drawable), &num_parasites);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -381,7 +381,7 @@ vectors_parasite_find_invoker (GimpProce
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_boxed (&return_vals->values[1], parasite);
@@ -409,7 +409,7 @@ vectors_parasite_attach_invoker (GimpPro
       gimp_item_parasite_attach (GIMP_ITEM (vectors), parasite);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -432,7 +432,7 @@ vectors_parasite_detach_invoker (GimpPro
       gimp_item_parasite_detach (GIMP_ITEM (vectors), name);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -456,7 +456,7 @@ vectors_parasite_list_invoker (GimpProce
       parasites = gimp_item_parasite_list (GIMP_ITEM (vectors), &num_parasites);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/paint-tools-cmds.c
===================================================================
--- app/pdb/paint-tools-cmds.c	(revision 26587)
+++ app/pdb/paint-tools-cmds.c	(working copy)
@@ -134,7 +134,7 @@ airbrush_invoker (GimpProcedure      *pr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -171,7 +171,7 @@ airbrush_default_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -223,7 +223,7 @@ clone_invoker (GimpProcedure      *proce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -260,7 +260,7 @@ clone_default_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -306,7 +306,7 @@ convolve_invoker (GimpProcedure      *pr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -343,7 +343,7 @@ convolve_default_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -392,7 +392,7 @@ dodgeburn_invoker (GimpProcedure      *p
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -429,7 +429,7 @@ dodgeburn_default_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -475,7 +475,7 @@ eraser_invoker (GimpProcedure      *proc
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -512,7 +512,7 @@ eraser_default_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -558,7 +558,7 @@ heal_invoker (GimpProcedure      *proced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -595,7 +595,7 @@ heal_default_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -646,7 +646,7 @@ paintbrush_invoker (GimpProcedure      *
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -683,7 +683,7 @@ paintbrush_default_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -720,7 +720,7 @@ pencil_invoker (GimpProcedure      *proc
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -763,7 +763,7 @@ smudge_invoker (GimpProcedure      *proc
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -800,7 +800,7 @@ smudge_default_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/image-cmds.c
===================================================================
--- app/pdb/image-cmds.c	(revision 26587)
+++ app/pdb/image-cmds.c	(working copy)
@@ -87,7 +87,7 @@ image_is_valid_invoker (GimpProcedure   
 
   valid = GIMP_IS_IMAGE (image);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_boolean (&return_vals->values[1], valid);
 
   return return_vals;
@@ -119,7 +119,7 @@ image_list_invoker (GimpProcedure      *
         image_ids[i] = gimp_image_get_ID (GIMP_IMAGE (list->data));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
   g_value_set_int (&return_vals->values[1], num_images);
   gimp_value_take_int32array (&return_vals->values[2], image_ids, num_images);
@@ -154,7 +154,7 @@ image_new_invoker (GimpProcedure      *p
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], image);
@@ -185,7 +185,7 @@ image_duplicate_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], new_image);
@@ -214,7 +214,7 @@ image_delete_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -237,7 +237,7 @@ image_base_type_invoker (GimpProcedure  
       base_type = gimp_image_base_type (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], base_type);
@@ -265,7 +265,7 @@ image_width_invoker (GimpProcedure      
       width = gimp_image_get_width (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], width);
@@ -293,7 +293,7 @@ image_height_invoker (GimpProcedure     
       height = gimp_image_get_height (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], height);
@@ -318,7 +318,7 @@ image_free_shadow_invoker (GimpProcedure
     {
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -348,7 +348,7 @@ image_resize_invoker (GimpProcedure     
                          new_width, new_height, offx, offy, NULL);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -369,7 +369,7 @@ image_resize_to_layers_invoker (GimpProc
       gimp_image_resize_to_layers (image, context, NULL);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -396,7 +396,7 @@ image_scale_invoker (GimpProcedure      
                         NULL);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -433,7 +433,7 @@ image_crop_invoker (GimpProcedure      *
                          FALSE, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -456,7 +456,7 @@ image_flip_invoker (GimpProcedure      *
       gimp_image_flip (image, context, flip_type, NULL);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -479,7 +479,7 @@ image_rotate_invoker (GimpProcedure     
       gimp_image_rotate (image, context, rotate_type, NULL);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -515,7 +515,7 @@ image_get_layers_invoker (GimpProcedure 
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -559,7 +559,7 @@ image_get_channels_invoker (GimpProcedur
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -603,7 +603,7 @@ image_get_vectors_invoker (GimpProcedure
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -634,7 +634,7 @@ image_get_active_drawable_invoker (GimpP
       drawable = gimp_image_get_active_drawable (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -660,7 +660,7 @@ image_unset_active_channel_invoker (Gimp
       gimp_image_unset_active_channel (image);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -683,7 +683,7 @@ image_get_floating_sel_invoker (GimpProc
       floating_sel = gimp_image_floating_sel (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], floating_sel);
@@ -716,7 +716,7 @@ image_floating_sel_attached_to_invoker (
         drawable = NULL;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -782,7 +782,7 @@ image_pick_color_invoker (GimpProcedure 
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_rgb (&return_vals->values[1], &color);
@@ -814,7 +814,7 @@ image_pick_correlate_layer_invoker (Gimp
       layer = gimp_image_pick_correlate_layer (image, x, y);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -854,7 +854,7 @@ image_add_layer_invoker (GimpProcedure  
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -877,7 +877,7 @@ image_remove_layer_invoker (GimpProcedur
       gimp_image_remove_layer (image, layer);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -905,7 +905,7 @@ image_get_layer_position_invoker (GimpPr
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], position);
@@ -933,7 +933,7 @@ image_raise_layer_invoker (GimpProcedure
       success = gimp_image_raise_layer (image, layer);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -956,7 +956,7 @@ image_lower_layer_invoker (GimpProcedure
       success = gimp_image_lower_layer (image, layer);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -979,7 +979,7 @@ image_raise_layer_to_top_invoker (GimpPr
       success = gimp_image_raise_layer_to_top (image, layer);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1002,7 +1002,7 @@ image_lower_layer_to_bottom_invoker (Gim
       success = gimp_image_lower_layer_to_bottom (image, layer);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1034,7 +1034,7 @@ image_add_channel_invoker (GimpProcedure
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1057,7 +1057,7 @@ image_remove_channel_invoker (GimpProced
       gimp_image_remove_channel (image, channel);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1085,7 +1085,7 @@ image_get_channel_position_invoker (Gimp
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], position);
@@ -1113,7 +1113,7 @@ image_raise_channel_invoker (GimpProcedu
       success = gimp_image_raise_channel (image, channel);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1136,7 +1136,7 @@ image_lower_channel_invoker (GimpProcedu
       success = gimp_image_lower_channel (image, channel);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1168,7 +1168,7 @@ image_add_vectors_invoker (GimpProcedure
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1191,7 +1191,7 @@ image_remove_vectors_invoker (GimpProced
       gimp_image_remove_vectors (image, vectors);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1219,7 +1219,7 @@ image_get_vectors_position_invoker (Gimp
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], position);
@@ -1247,7 +1247,7 @@ image_raise_vectors_invoker (GimpProcedu
       success = gimp_image_raise_vectors (image, vectors);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1270,7 +1270,7 @@ image_lower_vectors_invoker (GimpProcedu
       success = gimp_image_lower_vectors (image, vectors);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1293,7 +1293,7 @@ image_raise_vectors_to_top_invoker (Gimp
       success = gimp_image_raise_vectors_to_top (image, vectors);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1316,7 +1316,7 @@ image_lower_vectors_to_bottom_invoker (G
       success = gimp_image_lower_vectors_to_bottom (image, vectors);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1342,7 +1342,7 @@ image_flatten_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -1375,7 +1375,7 @@ image_merge_visible_layers_invoker (Gimp
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -1410,7 +1410,7 @@ image_merge_down_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -1441,7 +1441,7 @@ image_add_layer_mask_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1466,7 +1466,7 @@ image_remove_layer_mask_invoker (GimpPro
       gimp_layer_apply_mask (layer, mode, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1491,7 +1491,7 @@ image_get_colormap_invoker (GimpProcedur
       colormap = g_memdup (gimp_image_get_colormap (image), num_bytes);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1524,7 +1524,7 @@ image_set_colormap_invoker (GimpProcedur
       gimp_image_set_colormap (image, colormap, num_bytes / 3, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1545,7 +1545,7 @@ image_clean_all_invoker (GimpProcedure  
       gimp_image_clean_all (image);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1568,7 +1568,7 @@ image_is_dirty_invoker (GimpProcedure   
       dirty = (image->dirty != 0);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], dirty);
@@ -1635,7 +1635,7 @@ image_thumbnail_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1669,7 +1669,7 @@ image_get_active_layer_invoker (GimpProc
       active_layer = gimp_image_get_active_layer (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], active_layer);
@@ -1698,7 +1698,7 @@ image_set_active_layer_invoker (GimpProc
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1721,7 +1721,7 @@ image_get_active_channel_invoker (GimpPr
       active_channel = gimp_image_get_active_channel (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_channel (&return_vals->values[1], active_channel);
@@ -1750,7 +1750,7 @@ image_set_active_channel_invoker (GimpPr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1773,7 +1773,7 @@ image_get_active_vectors_invoker (GimpPr
       active_vectors = gimp_image_get_active_vectors (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_vectors (&return_vals->values[1], active_vectors);
@@ -1802,7 +1802,7 @@ image_set_active_vectors_invoker (GimpPr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1828,7 +1828,7 @@ image_get_selection_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_selection (&return_vals->values[1], selection);
@@ -1866,7 +1866,7 @@ image_get_component_active_invoker (Gimp
         active = gimp_image_get_component_active (image, component);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], active);
@@ -1904,7 +1904,7 @@ image_set_component_active_invoker (Gimp
         gimp_image_set_component_active (image, component, active);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1937,7 +1937,7 @@ image_get_component_visible_invoker (Gim
         visible = gimp_image_get_component_visible (image, component);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], visible);
@@ -1975,7 +1975,7 @@ image_set_component_visible_invoker (Gim
         gimp_image_set_component_visible (image, component, visible);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1998,7 +1998,7 @@ image_get_filename_invoker (GimpProcedur
       filename = gimp_image_get_filename (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], filename);
@@ -2044,7 +2044,7 @@ image_set_filename_invoker (GimpProcedur
         gimp_image_set_filename (image, filename);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -2072,7 +2072,7 @@ image_get_name_invoker (GimpProcedure   
         name = g_strdup (_("Untitled"));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -2101,7 +2101,7 @@ image_get_resolution_invoker (GimpProced
       gimp_image_get_resolution (image, &xresolution, &yresolution);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -2147,7 +2147,7 @@ image_set_resolution_invoker (GimpProced
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -2170,7 +2170,7 @@ image_get_unit_invoker (GimpProcedure   
       unit = gimp_image_get_unit (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], unit);
@@ -2198,7 +2198,7 @@ image_set_unit_invoker (GimpProcedure   
       gimp_image_set_unit (image, unit);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -2221,7 +2221,7 @@ image_get_tattoo_state_invoker (GimpProc
       tattoo_state = gimp_image_get_tattoo_state (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_uint (&return_vals->values[1], tattoo_state);
@@ -2249,7 +2249,7 @@ image_set_tattoo_state_invoker (GimpProc
       gimp_image_set_tattoo_state (image, tattoo_state);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -2274,7 +2274,7 @@ image_get_layer_by_tattoo_invoker (GimpP
       layer = gimp_image_get_layer_by_tattoo (image, tattoo);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -2304,7 +2304,7 @@ image_get_channel_by_tattoo_invoker (Gim
       channel = gimp_image_get_channel_by_tattoo (image, tattoo);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_channel (&return_vals->values[1], channel);
@@ -2334,7 +2334,7 @@ image_get_vectors_by_tattoo_invoker (Gim
       vectors = gimp_image_get_vectors_by_tattoo (image, tattoo);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_vectors (&return_vals->values[1], vectors);
Index: app/pdb/selection-cmds.c
===================================================================
--- app/pdb/selection-cmds.c	(revision 26587)
+++ app/pdb/selection-cmds.c	(working copy)
@@ -66,7 +66,7 @@ selection_bounds_invoker (GimpProcedure 
                                        &x1, &y1, &x2, &y2);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -104,7 +104,7 @@ selection_value_invoker (GimpProcedure  
       value = gimp_pickable_get_opacity_at (GIMP_PICKABLE (gimp_image_get_mask (image)), x, y);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], value);
@@ -132,7 +132,7 @@ selection_is_empty_invoker (GimpProcedur
       is_empty = gimp_channel_is_empty (gimp_image_get_mask (image));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], is_empty);
@@ -163,7 +163,7 @@ selection_translate_invoker (GimpProcedu
                            offx, offy, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -201,7 +201,7 @@ selection_float_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -227,7 +227,7 @@ selection_invert_invoker (GimpProcedure 
       gimp_channel_invert (gimp_image_get_mask (image), TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -248,7 +248,7 @@ selection_sharpen_invoker (GimpProcedure
       gimp_channel_sharpen (gimp_image_get_mask (image), TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -269,7 +269,7 @@ selection_all_invoker (GimpProcedure    
       gimp_channel_all (gimp_image_get_mask (image), TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -290,7 +290,7 @@ selection_none_invoker (GimpProcedure   
       gimp_channel_clear (gimp_image_get_mask (image), NULL, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -314,7 +314,7 @@ selection_feather_invoker (GimpProcedure
                             radius, radius, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -339,7 +339,7 @@ selection_border_invoker (GimpProcedure 
                            radius, radius, TRUE, TRUE, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -363,7 +363,7 @@ selection_grow_invoker (GimpProcedure   
                          steps, steps, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -387,7 +387,7 @@ selection_shrink_invoker (GimpProcedure 
                            steps, steps, FALSE, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -412,7 +412,7 @@ selection_layer_alpha_invoker (GimpProce
                                  GIMP_CHANNEL_OP_REPLACE, FALSE, 0.0, 0.0);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -444,7 +444,7 @@ selection_load_invoker (GimpProcedure   
                                    FALSE, 0.0, 0.0);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -470,7 +470,7 @@ selection_save_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_channel (&return_vals->values[1], channel);
@@ -509,7 +509,7 @@ selection_combine_invoker (GimpProcedure
                                    FALSE, 0.0, 0.0);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/grid-cmds.c
===================================================================
--- app/pdb/grid-cmds.c	(revision 26587)
+++ app/pdb/grid-cmds.c	(working copy)
@@ -66,7 +66,7 @@ image_grid_get_spacing_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -107,7 +107,7 @@ image_grid_set_spacing_invoker (GimpProc
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -139,7 +139,7 @@ image_grid_get_offset_invoker (GimpProce
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -180,7 +180,7 @@ image_grid_set_offset_invoker (GimpProce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -208,7 +208,7 @@ image_grid_get_foreground_color_invoker 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_rgb (&return_vals->values[1], &fgcolor);
@@ -241,7 +241,7 @@ image_grid_set_foreground_color_invoker 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -269,7 +269,7 @@ image_grid_get_background_color_invoker 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_rgb (&return_vals->values[1], &bgcolor);
@@ -302,7 +302,7 @@ image_grid_set_background_color_invoker 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -330,7 +330,7 @@ image_grid_get_style_invoker (GimpProced
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], style);
@@ -363,7 +363,7 @@ image_grid_set_style_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/misc-cmds.c
===================================================================
--- app/pdb/misc-cmds.c	(revision 26587)
+++ app/pdb/misc-cmds.c	(working copy)
@@ -48,7 +48,7 @@ version_invoker (GimpProcedure      *pro
 
   version = g_strdup (GIMP_VERSION);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_take_string (&return_vals->values[1], version);
 
   return return_vals;
@@ -67,7 +67,7 @@ getpid_invoker (GimpProcedure      *proc
 
   pid = get_pid ();
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_int (&return_vals->values[1], pid);
 
   return return_vals;
@@ -91,7 +91,7 @@ quit_invoker (GimpProcedure      *proced
       gimp_exit (gimp, force);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/gradient-cmds.c
===================================================================
--- app/pdb/gradient-cmds.c	(revision 26587)
+++ app/pdb/gradient-cmds.c	(working copy)
@@ -114,7 +114,7 @@ gradient_new_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], actual_name);
@@ -156,7 +156,7 @@ gradient_duplicate_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], copy_name);
@@ -189,7 +189,7 @@ gradient_is_editable_invoker (GimpProced
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], editable);
@@ -227,7 +227,7 @@ gradient_rename_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], actual_name);
@@ -260,7 +260,7 @@ gradient_delete_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -294,7 +294,7 @@ gradient_get_number_of_segments_invoker 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], num_segments);
@@ -356,7 +356,7 @@ gradient_get_uniform_samples_invoker (Gi
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -422,7 +422,7 @@ gradient_get_custom_samples_invoker (Gim
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -467,7 +467,7 @@ gradient_segment_get_left_color_invoker 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -513,7 +513,7 @@ gradient_segment_set_left_color_invoker 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -550,7 +550,7 @@ gradient_segment_get_right_color_invoker
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -596,7 +596,7 @@ gradient_segment_set_right_color_invoker
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -631,7 +631,7 @@ gradient_segment_get_left_pos_invoker (G
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], pos);
@@ -673,7 +673,7 @@ gradient_segment_set_left_pos_invoker (G
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], final_pos);
@@ -713,7 +713,7 @@ gradient_segment_get_middle_pos_invoker 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], pos);
@@ -756,7 +756,7 @@ gradient_segment_set_middle_pos_invoker 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], final_pos);
@@ -796,7 +796,7 @@ gradient_segment_get_right_pos_invoker (
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], pos);
@@ -839,7 +839,7 @@ gradient_segment_set_right_pos_invoker (
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], final_pos);
@@ -879,7 +879,7 @@ gradient_segment_get_blending_function_i
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], blend_func);
@@ -919,7 +919,7 @@ gradient_segment_get_coloring_type_invok
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], coloring_type);
@@ -965,7 +965,7 @@ gradient_segment_range_set_blending_func
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1006,7 +1006,7 @@ gradient_segment_range_set_coloring_type
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1045,7 +1045,7 @@ gradient_segment_range_flip_invoker (Gim
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1087,7 +1087,7 @@ gradient_segment_range_replicate_invoker
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1126,7 +1126,7 @@ gradient_segment_range_split_midpoint_in
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1168,7 +1168,7 @@ gradient_segment_range_split_uniform_inv
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1207,7 +1207,7 @@ gradient_segment_range_delete_invoker (G
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1245,7 +1245,7 @@ gradient_segment_range_redistribute_hand
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1286,7 +1286,7 @@ gradient_segment_range_blend_colors_invo
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1327,7 +1327,7 @@ gradient_segment_range_blend_opacity_inv
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1373,7 +1373,7 @@ gradient_segment_range_move_invoker (Gim
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], final_delta);
Index: app/pdb/text-tool-cmds.c
===================================================================
--- app/pdb/text-tool-cmds.c	(revision 26587)
+++ app/pdb/text-tool-cmds.c	(working copy)
@@ -88,7 +88,7 @@ text_fontname_invoker (GimpProcedure    
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], text_layer);
@@ -131,7 +131,7 @@ text_get_extents_fontname_invoker (GimpP
       g_free (real_fontname);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -208,7 +208,7 @@ text_invoker (GimpProcedure      *proced
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], text_layer);
@@ -265,7 +265,7 @@ text_get_extents_invoker (GimpProcedure 
       g_free (real_fontname);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/patterns-cmds.c
===================================================================
--- app/pdb/patterns-cmds.c	(revision 26587)
+++ app/pdb/patterns-cmds.c	(working copy)
@@ -50,7 +50,7 @@ patterns_refresh_invoker (GimpProcedure 
 {
   gimp_data_factory_data_refresh (gimp->pattern_factory);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -75,7 +75,7 @@ patterns_get_list_invoker (GimpProcedure
                                                              filter, &num_patterns);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -111,7 +111,7 @@ patterns_get_pattern_invoker (GimpProced
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -166,7 +166,7 @@ patterns_get_pattern_data_invoker (GimpP
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/gradient-select-cmds.c
===================================================================
--- app/pdb/gradient-select-cmds.c	(revision 26587)
+++ app/pdb/gradient-select-cmds.c	(working copy)
@@ -68,7 +68,7 @@ gradients_popup_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -93,7 +93,7 @@ gradients_close_popup_invoker (GimpProce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -121,7 +121,7 @@ gradients_set_popup_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/plug-in-cmds.c
===================================================================
--- app/pdb/plug-in-cmds.c	(revision 26587)
+++ app/pdb/plug-in-cmds.c	(working copy)
@@ -72,7 +72,7 @@ plugins_query_invoker (GimpProcedure    
                                             &plugin_real_name,
                                             &plugin_install_time);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
   g_value_set_int (&return_vals->values[1], num_plugins);
   gimp_value_take_stringarray (&return_vals->values[2], menu_path, num_plugins);
@@ -120,7 +120,7 @@ plugin_domain_register_invoker (GimpProc
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -153,7 +153,7 @@ plugin_help_register_invoker (GimpProced
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -187,7 +187,7 @@ plugin_menu_register_invoker (GimpProced
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -220,7 +220,7 @@ plugin_menu_branch_register_invoker (Gim
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -270,7 +270,7 @@ plugin_icon_register_invoker (GimpProced
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/layer-cmds.c
===================================================================
--- app/pdb/layer-cmds.c	(revision 26587)
+++ app/pdb/layer-cmds.c	(working copy)
@@ -81,7 +81,7 @@ layer_new_invoker (GimpProcedure      *p
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -119,7 +119,7 @@ layer_new_from_visible_invoker (GimpProc
                                          GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -165,7 +165,7 @@ layer_new_from_drawable_invoker (GimpPro
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer_copy);
@@ -205,7 +205,7 @@ layer_copy_invoker (GimpProcedure      *
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer_copy);
@@ -231,7 +231,7 @@ layer_add_alpha_invoker (GimpProcedure  
       gimp_layer_add_alpha (layer);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -252,7 +252,7 @@ layer_flatten_invoker (GimpProcedure    
       gimp_layer_flatten (layer, context);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -284,7 +284,7 @@ layer_scale_invoker (GimpProcedure      
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -317,7 +317,7 @@ layer_resize_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -341,7 +341,7 @@ layer_resize_to_image_size_invoker (Gimp
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -376,7 +376,7 @@ layer_translate_invoker (GimpProcedure  
       gimp_image_undo_group_end (image);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -414,7 +414,7 @@ layer_set_offsets_invoker (GimpProcedure
       gimp_image_undo_group_end (image);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -455,7 +455,7 @@ layer_create_mask_invoker (GimpProcedure
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer_mask (&return_vals->values[1], mask);
@@ -483,7 +483,7 @@ layer_get_mask_invoker (GimpProcedure   
       mask = gimp_layer_get_mask (layer);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer_mask (&return_vals->values[1], mask);
@@ -511,7 +511,7 @@ layer_from_mask_invoker (GimpProcedure  
       layer = gimp_layer_mask_get_layer (mask);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -542,7 +542,7 @@ layer_add_mask_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -568,7 +568,7 @@ layer_remove_mask_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -591,7 +591,7 @@ layer_is_floating_sel_invoker (GimpProce
       is_floating_sel = gimp_layer_is_floating_sel (layer);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], is_floating_sel);
@@ -619,7 +619,7 @@ layer_get_lock_alpha_invoker (GimpProced
       lock_alpha = gimp_layer_get_lock_alpha (layer);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], lock_alpha);
@@ -647,7 +647,7 @@ layer_set_lock_alpha_invoker (GimpProced
       gimp_layer_set_lock_alpha (layer, lock_alpha, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -673,7 +673,7 @@ layer_get_apply_mask_invoker (GimpProced
         apply_mask = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], apply_mask);
@@ -704,7 +704,7 @@ layer_set_apply_mask_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -730,7 +730,7 @@ layer_get_show_mask_invoker (GimpProcedu
         show_mask = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], show_mask);
@@ -761,7 +761,7 @@ layer_set_show_mask_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -787,7 +787,7 @@ layer_get_edit_mask_invoker (GimpProcedu
         edit_mask = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], edit_mask);
@@ -818,7 +818,7 @@ layer_set_edit_mask_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -841,7 +841,7 @@ layer_get_opacity_invoker (GimpProcedure
       opacity = gimp_layer_get_opacity (layer) * 100.0;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], opacity);
@@ -869,7 +869,7 @@ layer_set_opacity_invoker (GimpProcedure
       gimp_layer_set_opacity (layer, opacity / 100.0, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -892,7 +892,7 @@ layer_get_mode_invoker (GimpProcedure   
       mode = gimp_layer_get_mode (layer);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], mode);
@@ -920,7 +920,7 @@ layer_set_mode_invoker (GimpProcedure   
       gimp_layer_set_mode (layer, mode, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/color-cmds.c
===================================================================
--- app/pdb/color-cmds.c	(revision 26587)
+++ app/pdb/color-cmds.c	(working copy)
@@ -76,7 +76,7 @@ brightness_contrast_invoker (GimpProcedu
                                            brightness, contrast);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -122,7 +122,7 @@ levels_invoker (GimpProcedure      *proc
                               low_output, high_output);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -148,7 +148,7 @@ levels_auto_invoker (GimpProcedure      
         gimp_drawable_levels_stretch (drawable, progress);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -174,7 +174,7 @@ levels_stretch_invoker (GimpProcedure   
         gimp_drawable_levels_stretch (drawable, progress);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -202,7 +202,7 @@ posterize_invoker (GimpProcedure      *p
         gimp_drawable_posterize (drawable, progress, levels);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -228,7 +228,7 @@ desaturate_invoker (GimpProcedure      *
         gimp_drawable_desaturate (drawable, progress, GIMP_DESATURATE_LIGHTNESS);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -256,7 +256,7 @@ desaturate_full_invoker (GimpProcedure  
         gimp_drawable_desaturate (drawable, progress, desaturate_mode);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -284,7 +284,7 @@ equalize_invoker (GimpProcedure      *pr
         gimp_drawable_equalize (drawable, mask_only);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -310,7 +310,7 @@ invert_invoker (GimpProcedure      *proc
         gimp_drawable_invert (drawable, progress);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -347,7 +347,7 @@ curves_spline_invoker (GimpProcedure    
                                      channel, control_pts, num_points);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -384,7 +384,7 @@ curves_explicit_invoker (GimpProcedure  
                                        channel, curve, num_bytes);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -423,7 +423,7 @@ color_balance_invoker (GimpProcedure    
                                      preserve_lum);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -456,7 +456,7 @@ colorize_invoker (GimpProcedure      *pr
                                 hue, saturation, lightness);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -516,7 +516,7 @@ histogram_invoker (GimpProcedure      *p
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -563,7 +563,7 @@ hue_saturation_invoker (GimpProcedure   
                                       hue_range, hue_offset, saturation, lightness);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -595,7 +595,7 @@ threshold_invoker (GimpProcedure      *p
                                  low_threshold, high_threshold);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/unit-cmds.c
===================================================================
--- app/pdb/unit-cmds.c	(revision 26587)
+++ app/pdb/unit-cmds.c	(working copy)
@@ -47,7 +47,7 @@ unit_get_number_of_units_invoker (GimpPr
 
   num_units = _gimp_unit_get_number_of_units (gimp);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_int (&return_vals->values[1], num_units);
 
   return return_vals;
@@ -66,7 +66,7 @@ unit_get_number_of_built_in_units_invoke
 
   num_units = _gimp_unit_get_number_of_built_in_units (gimp);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_int (&return_vals->values[1], num_units);
 
   return return_vals;
@@ -105,7 +105,7 @@ unit_new_invoker (GimpProcedure      *pr
                                 symbol, abbreviation, singular, plural);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], unit_id);
@@ -133,7 +133,7 @@ unit_get_deletion_flag_invoker (GimpProc
       deletion_flag = _gimp_unit_get_deletion_flag (gimp, unit_id);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], deletion_flag);
@@ -161,7 +161,7 @@ unit_set_deletion_flag_invoker (GimpProc
       _gimp_unit_set_deletion_flag (gimp, unit_id, deletion_flag);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -184,7 +184,7 @@ unit_get_identifier_invoker (GimpProcedu
       identifier = g_strdup (_gimp_unit_get_identifier (gimp, unit_id));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], identifier);
@@ -212,7 +212,7 @@ unit_get_factor_invoker (GimpProcedure  
       factor = _gimp_unit_get_factor (gimp, unit_id);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], factor);
@@ -240,7 +240,7 @@ unit_get_digits_invoker (GimpProcedure  
       digits = _gimp_unit_get_digits (gimp, unit_id);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], digits);
@@ -268,7 +268,7 @@ unit_get_symbol_invoker (GimpProcedure  
       symbol = g_strdup (_gimp_unit_get_symbol (gimp, unit_id));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], symbol);
@@ -296,7 +296,7 @@ unit_get_abbreviation_invoker (GimpProce
       abbreviation = g_strdup (_gimp_unit_get_abbreviation (gimp, unit_id));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], abbreviation);
@@ -324,7 +324,7 @@ unit_get_singular_invoker (GimpProcedure
       singular = g_strdup (_gimp_unit_get_singular (gimp, unit_id));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], singular);
@@ -352,7 +352,7 @@ unit_get_plural_invoker (GimpProcedure  
       plural = g_strdup (_gimp_unit_get_plural (gimp, unit_id));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], plural);
Index: app/pdb/guides-cmds.c
===================================================================
--- app/pdb/guides-cmds.c	(revision 26587)
+++ app/pdb/guides-cmds.c	(working copy)
@@ -65,7 +65,7 @@ image_add_hguide_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_uint (&return_vals->values[1], guide);
@@ -103,7 +103,7 @@ image_add_vguide_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_uint (&return_vals->values[1], guide);
@@ -136,7 +136,7 @@ image_delete_guide_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -164,7 +164,7 @@ image_find_next_guide_invoker (GimpProce
         next_guide = gimp_guide_get_ID (g);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_uint (&return_vals->values[1], next_guide);
@@ -199,7 +199,7 @@ image_get_guide_orientation_invoker (Gim
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], orientation);
@@ -234,7 +234,7 @@ image_get_guide_position_invoker (GimpPr
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], position);
Index: app/pdb/convert-cmds.c
===================================================================
--- app/pdb/convert-cmds.c	(revision 26587)
+++ app/pdb/convert-cmds.c	(working copy)
@@ -65,7 +65,7 @@ image_convert_rgb_invoker (GimpProcedure
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -95,7 +95,7 @@ image_convert_grayscale_invoker (GimpPro
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -168,7 +168,7 @@ image_convert_indexed_invoker (GimpProce
                                       NULL, error);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -195,7 +195,7 @@ image_convert_set_dither_matrix_invoker 
       gimp_image_convert_set_dither_matrix (matrix, width, height);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/gimpprocedure.c
===================================================================
--- app/pdb/gimpprocedure.c	(revision 26587)
+++ app/pdb/gimpprocedure.c	(working copy)
@@ -303,7 +303,8 @@ gimp_procedure_execute (GimpProcedure  *
                         GValueArray    *args,
                         GError        **error)
 {
-  GValueArray *return_vals = NULL;
+  GValueArray *return_vals;
+  GError      *pdb_error = NULL;
 
   g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure), NULL);
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
@@ -314,10 +315,11 @@ gimp_procedure_execute (GimpProcedure  *
 
   if (! gimp_procedure_validate_args (procedure,
                                       procedure->args, procedure->num_args,
-                                      args, FALSE, error))
+                                      args, FALSE, &pdb_error))
     {
-      return_vals = gimp_procedure_get_return_values (procedure, FALSE);
-      g_value_set_enum (return_vals->values, GIMP_PDB_CALLING_ERROR);
+      return_vals = gimp_procedure_get_return_values (procedure, FALSE,
+                                                      pdb_error);
+      g_propagate_error (error, pdb_error);
 
       return return_vals;
     }
@@ -330,13 +332,13 @@ gimp_procedure_execute (GimpProcedure  *
                                                                args,
                                                                error);
 
-  /*  If there are no return arguments, assume an execution error  */
+  /*  If there are no return values, assume an execution error  */
   if (! return_vals)
     {
-      return_vals = gimp_procedure_get_return_values (procedure, FALSE);
-      g_value_set_enum (return_vals->values, GIMP_PDB_EXECUTION_ERROR);
+      g_warning ("%s->execute() returned no return values",
+                 G_OBJECT_TYPE_NAME (procedure));
 
-      return return_vals;
+      return_vals = gimp_procedure_get_return_values (procedure, FALSE, NULL);
     }
 
   return return_vals;
@@ -392,36 +394,72 @@ gimp_procedure_get_arguments (GimpProced
 
 GValueArray *
 gimp_procedure_get_return_values (GimpProcedure *procedure,
-                                  gboolean       success)
+                                  gboolean       success,
+                                  GError        *error)
 {
   GValueArray *args;
   GValue       value = { 0, };
-  gint         n_args;
   gint         i;
 
-  g_return_val_if_fail (GIMP_IS_PROCEDURE (procedure) ||
-                        success == FALSE, NULL);
+  g_return_val_if_fail (success == FALSE || GIMP_IS_PROCEDURE (procedure),
+                        NULL);
+
+  if (success)
+    {
+      args = g_value_array_new (procedure->num_values + 1);
+
+      g_value_init (&value, GIMP_TYPE_PDB_STATUS_TYPE);
+      g_value_set_enum (&value, GIMP_PDB_SUCCESS);
+      g_value_array_append (args, &value);
+      g_value_unset (&value);
 
-  if (procedure)
-    n_args = procedure->num_values + 1;
+      for (i = 0; i < procedure->num_values; i++)
+        {
+          g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (procedure->values[i]));
+          g_value_array_append (args, &value);
+          g_value_unset (&value);
+        }
+    }
   else
-    n_args = 1;
+    {
+      args = g_value_array_new ((error && error->message) ? 2 : 1);
+
+      g_value_init (&value, GIMP_TYPE_PDB_STATUS_TYPE);
+
+      if (error && error->domain == GIMP_PDB_ERROR)
+        {
+          switch ((GimpPdbErrorCode) error->code)
+            {
+            case GIMP_PDB_PROCEDURE_NOT_FOUND:
+            case GIMP_PDB_INVALID_ARGUMENT:
+            case GIMP_PDB_INTERNAL_ERROR:
+              g_value_set_enum (&value, GIMP_PDB_CALLING_ERROR);
+              break;
+
+            case GIMP_PDB_CALL_CANCELLED:
+              g_value_set_enum (&value, GIMP_PDB_CALLING_ERROR);
+              break;
+
+            default:
+              g_assert_not_reached ();
+            }
+        }
+      else
+        {
+          g_value_set_enum (&value, GIMP_PDB_EXECUTION_ERROR);
+        }
 
-  args = g_value_array_new (n_args);
+      g_value_array_append (args, &value);
+      g_value_unset (&value);
 
-  g_value_init (&value, GIMP_TYPE_PDB_STATUS_TYPE);
-  g_value_set_enum (&value,
-                    success ? GIMP_PDB_SUCCESS : GIMP_PDB_EXECUTION_ERROR);
-  g_value_array_append (args, &value);
-  g_value_unset (&value);
-
-  if (procedure)
-    for (i = 0; i < procedure->num_values; i++)
-      {
-        g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (procedure->values[i]));
-        g_value_array_append (args, &value);
-        g_value_unset (&value);
-      }
+      if (error && error->message)
+        {
+          g_value_init (&value, G_TYPE_STRING);
+          g_value_set_string (&value, error->message);
+          g_value_array_append (args, &value);
+          g_value_unset (&value);
+        }
+    }
 
   return args;
 }
Index: app/pdb/gimprc-cmds.c
===================================================================
--- app/pdb/gimprc-cmds.c	(revision 26587)
+++ app/pdb/gimprc-cmds.c	(working copy)
@@ -70,7 +70,7 @@ gimprc_query_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], value);
@@ -104,7 +104,7 @@ gimprc_set_invoker (GimpProcedure      *
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -120,7 +120,7 @@ get_default_comment_invoker (GimpProcedu
 
   comment = g_strdup (gimp->config->default_image->comment);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_take_string (&return_vals->values[1], comment);
 
   return return_vals;
@@ -139,7 +139,7 @@ get_default_unit_invoker (GimpProcedure 
 
   unit_id = gimp_get_default_unit ();
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_int (&return_vals->values[1], unit_id);
 
   return return_vals;
@@ -160,7 +160,7 @@ get_monitor_resolution_invoker (GimpProc
   xres = GIMP_DISPLAY_CONFIG (gimp->config)->monitor_xres;
   yres = GIMP_DISPLAY_CONFIG (gimp->config)->monitor_yres;
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
   g_value_set_double (&return_vals->values[1], xres);
   g_value_set_double (&return_vals->values[2], yres);
@@ -181,7 +181,7 @@ get_theme_dir_invoker (GimpProcedure    
 
   theme_dir = g_strdup (gimp_get_theme_dir (gimp));
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_take_string (&return_vals->values[1], theme_dir);
 
   return return_vals;
@@ -200,7 +200,7 @@ get_color_configuration_invoker (GimpPro
 
   config = gimp_config_serialize_to_string (GIMP_CONFIG (gimp->config->color_management), NULL);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_take_string (&return_vals->values[1], config);
 
   return return_vals;
@@ -219,7 +219,7 @@ get_module_load_inhibit_invoker (GimpPro
 
   load_inhibit = g_strdup (gimp_module_db_get_load_inhibit (gimp->module_db));
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_take_string (&return_vals->values[1], load_inhibit);
 
   return return_vals;
Index: app/pdb/selection-tools-cmds.c
===================================================================
--- app/pdb/selection-tools-cmds.c	(revision 26587)
+++ app/pdb/selection-tools-cmds.c	(working copy)
@@ -83,7 +83,7 @@ by_color_select_invoker (GimpProcedure  
                                     feather_radius);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -136,7 +136,7 @@ by_color_select_full_invoker (GimpProced
                                     feather_radius_y);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -181,7 +181,7 @@ ellipse_select_invoker (GimpProcedure   
                                    TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -223,7 +223,7 @@ free_select_invoker (GimpProcedure      
                                    TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -273,7 +273,7 @@ fuzzy_select_invoker (GimpProcedure     
                                  feather_radius);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -329,7 +329,7 @@ fuzzy_select_full_invoker (GimpProcedure
                                  feather_radius_y);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -371,7 +371,7 @@ rect_select_invoker (GimpProcedure      
                                      TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -424,7 +424,7 @@ round_rect_select_invoker (GimpProcedure
                                       TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/procedural-db-cmds.c
===================================================================
--- app/pdb/procedural-db-cmds.c	(revision 26587)
+++ app/pdb/procedural-db-cmds.c	(working copy)
@@ -53,7 +53,7 @@ procedural_db_temp_name_invoker (GimpPro
 
   temp_name = g_strdup_printf ("temp-procedure-number-%d", proc_number++);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_take_string (&return_vals->values[1], temp_name);
 
   return return_vals;
@@ -77,7 +77,7 @@ procedural_db_dump_invoker (GimpProcedur
       success = gimp_pdb_dump (gimp->pdb, filename);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -117,7 +117,7 @@ procedural_db_query_invoker (GimpProcedu
                                 error);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -165,7 +165,7 @@ procedural_db_proc_exists_invoker (GimpP
       exists = (procedure != NULL);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], exists);
@@ -212,7 +212,7 @@ procedural_db_proc_info_invoker (GimpPro
       g_free (canonical);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -281,7 +281,7 @@ procedural_db_proc_arg_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -345,7 +345,7 @@ procedural_db_proc_val_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -389,7 +389,7 @@ procedural_db_get_data_invoker (GimpProc
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -426,7 +426,7 @@ procedural_db_get_data_size_invoker (Gim
       g_free (canonical);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], bytes);
@@ -461,7 +461,7 @@ procedural_db_set_data_invoker (GimpProc
       g_free (canonical);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/context-cmds.c
===================================================================
--- app/pdb/context-cmds.c	(revision 26587)
+++ app/pdb/context-cmds.c	(working copy)
@@ -57,7 +57,7 @@ context_push_invoker (GimpProcedure     
   else
     success = FALSE;
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -76,7 +76,7 @@ context_pop_invoker (GimpProcedure      
   else
     success = FALSE;
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -94,7 +94,7 @@ context_list_paint_methods_invoker (Gimp
   paint_methods = gimp_container_get_name_array (gimp->paint_info_list,
                                                  &num_paint_methods);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
 
   g_value_set_int (&return_vals->values[1], num_paint_methods);
   gimp_value_take_stringarray (&return_vals->values[2], paint_methods, num_paint_methods);
@@ -121,7 +121,7 @@ context_get_paint_method_invoker (GimpPr
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -152,7 +152,7 @@ context_set_paint_method_invoker (GimpPr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -169,7 +169,7 @@ context_get_foreground_invoker (GimpProc
   gimp_context_get_foreground (context, &foreground);
   gimp_rgb_set_alpha (&foreground, 1.0);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   gimp_value_set_rgb (&return_vals->values[1], &foreground);
 
   return return_vals;
@@ -194,7 +194,7 @@ context_set_foreground_invoker (GimpProc
       gimp_context_set_foreground (context, &foreground);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -211,7 +211,7 @@ context_get_background_invoker (GimpProc
   gimp_context_get_background (context, &background);
   gimp_rgb_set_alpha (&background, 1.0);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   gimp_value_set_rgb (&return_vals->values[1], &background);
 
   return return_vals;
@@ -236,7 +236,7 @@ context_set_background_invoker (GimpProc
       gimp_context_set_background (context, &background);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -249,7 +249,7 @@ context_set_default_colors_invoker (Gimp
 {
   gimp_context_set_default_colors (context);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -262,7 +262,7 @@ context_swap_colors_invoker (GimpProcedu
 {
   gimp_context_swap_colors (context);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -278,7 +278,7 @@ context_get_opacity_invoker (GimpProcedu
 
   opacity = gimp_context_get_opacity (context) * 100.0;
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_double (&return_vals->values[1], opacity);
 
   return return_vals;
@@ -302,7 +302,7 @@ context_set_opacity_invoker (GimpProcedu
       gimp_context_set_opacity (context, opacity / 100.0);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -318,7 +318,7 @@ context_get_paint_mode_invoker (GimpProc
 
   paint_mode = gimp_context_get_paint_mode (context);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_enum (&return_vals->values[1], paint_mode);
 
   return return_vals;
@@ -342,7 +342,7 @@ context_set_paint_mode_invoker (GimpProc
       gimp_context_set_paint_mode (context, paint_mode);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -364,7 +364,7 @@ context_get_brush_invoker (GimpProcedure
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -395,7 +395,7 @@ context_set_brush_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -417,7 +417,7 @@ context_get_pattern_invoker (GimpProcedu
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -448,7 +448,7 @@ context_set_pattern_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -470,7 +470,7 @@ context_get_gradient_invoker (GimpProced
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -501,7 +501,7 @@ context_set_gradient_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -523,7 +523,7 @@ context_get_palette_invoker (GimpProcedu
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -554,7 +554,7 @@ context_set_palette_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -576,7 +576,7 @@ context_get_font_invoker (GimpProcedure 
   else
     success = FALSE;
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -607,7 +607,7 @@ context_set_font_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/gimpprocedure.h
===================================================================
--- app/pdb/gimpprocedure.h	(revision 26587)
+++ app/pdb/gimpprocedure.h	(working copy)
@@ -121,7 +121,8 @@ void            gimp_procedure_add_retur
 
 GValueArray   * gimp_procedure_get_arguments      (GimpProcedure    *procedure);
 GValueArray   * gimp_procedure_get_return_values  (GimpProcedure    *procedure,
-                                                   gboolean          success);
+                                                   gboolean          success,
+                                                   GError           *error);
 
 GValueArray   * gimp_procedure_execute            (GimpProcedure    *procedure,
                                                    Gimp             *gimp,
Index: app/pdb/help-cmds.c
===================================================================
--- app/pdb/help-cmds.c	(revision 26587)
+++ app/pdb/help-cmds.c	(working copy)
@@ -63,7 +63,7 @@ help_invoker (GimpProcedure      *proced
       gimp_help (gimp, progress, help_domain, help_id);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/gimppdb.c
===================================================================
--- app/pdb/gimppdb.c	(revision 26587)
+++ app/pdb/gimppdb.c	(working copy)
@@ -302,12 +302,12 @@ gimp_pdb_execute_procedure_by_name_args 
 
   if (list == NULL)
     {
-      g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_PROCEDURE_NOT_FOUND,
-                   _("PDB calling error:\n"
-                     "Procedure '%s' not found"), name);
+      GError *pdb_error = g_error_new (GIMP_PDB_ERROR,
+                                       GIMP_PDB_PROCEDURE_NOT_FOUND,
+                                       _("Procedure '%s' not found"), name);
 
-      return_vals = gimp_procedure_get_return_values (NULL, FALSE);
-      g_value_set_enum (return_vals->values, GIMP_PDB_CALLING_ERROR);
+      return_vals = gimp_procedure_get_return_values (NULL, FALSE, pdb_error);
+      g_propagate_error (error, pdb_error);
 
       return return_vals;
     }
@@ -370,14 +370,14 @@ gimp_pdb_execute_procedure_by_name (Gimp
 
   procedure = gimp_pdb_lookup_procedure (pdb, name);
 
-  if (procedure == NULL)
+  if (! procedure)
     {
-      g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_PROCEDURE_NOT_FOUND,
-                    _("PDB calling error:\n"
-                      "Procedure '%s' not found"), name);
+      GError *pdb_error = g_error_new (GIMP_PDB_ERROR,
+                                       GIMP_PDB_PROCEDURE_NOT_FOUND,
+                                       _("Procedure '%s' not found"), name);
 
-      return_vals = gimp_procedure_get_return_values (NULL, FALSE);
-      g_value_set_enum (return_vals->values, GIMP_PDB_CALLING_ERROR);
+      return_vals = gimp_procedure_get_return_values (NULL, FALSE, pdb_error);
+      g_propagate_error (error, pdb_error);
 
       return return_vals;
     }
@@ -401,19 +401,22 @@ gimp_pdb_execute_procedure_by_name (Gimp
 
       if (arg_type != G_VALUE_TYPE (value))
         {
+          GError      *pdb_error;
           const gchar *expected = g_type_name (G_VALUE_TYPE (value));
           const gchar *got      = g_type_name (arg_type);
 
           g_value_array_free (args);
 
-          g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_INVALID_ARGUMENT,
-                       _("PDB calling error for procedure '%s':\n"
-                         "Argument #%d type mismatch (expected %s, got %s)"),
-                       gimp_object_get_name (GIMP_OBJECT (procedure)),
-                       i + 1, expected, got);
-
-          return_vals = gimp_procedure_get_return_values (procedure, FALSE);
-          g_value_set_enum (return_vals->values, GIMP_PDB_CALLING_ERROR);
+          pdb_error = g_error_new (GIMP_PDB_ERROR, GIMP_PDB_INVALID_ARGUMENT,
+                                   _("Procedure '%s' called with wrong "
+                                     "type for argument #%d "
+                                     "(expected %s, got %s)"),
+                                   gimp_object_get_name (GIMP_OBJECT (procedure)),
+                                   i + 1, expected, got);
+
+          return_vals = gimp_procedure_get_return_values (procedure,
+                                                          FALSE, pdb_error);
+          g_propagate_error (error, pdb_error);
 
           va_end (va_args);
 
@@ -424,13 +427,18 @@ gimp_pdb_execute_procedure_by_name (Gimp
 
       if (error_msg)
         {
+          GError *pdb_error = g_error_new (GIMP_PDB_ERROR,
+                                           GIMP_PDB_INTERNAL_ERROR,
+                                           "%s", error_msg);
+
           g_warning ("%s: %s", G_STRFUNC, error_msg);
           g_free (error_msg);
 
           g_value_array_free (args);
 
-          return_vals = gimp_procedure_get_return_values (procedure, FALSE);
-          g_value_set_enum (return_vals->values, GIMP_PDB_CALLING_ERROR);
+          return_vals = gimp_procedure_get_return_values (procedure,
+                                                          FALSE, pdb_error);
+          g_propagate_error (error, pdb_error);
 
           va_end (va_args);
 
Index: app/pdb/brush-select-cmds.c
===================================================================
--- app/pdb/brush-select-cmds.c	(revision 26587)
+++ app/pdb/brush-select-cmds.c	(working copy)
@@ -70,7 +70,7 @@ brushes_popup_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -95,7 +95,7 @@ brushes_close_popup_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -132,7 +132,7 @@ brushes_set_popup_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/undo-cmds.c
===================================================================
--- app/pdb/undo-cmds.c	(revision 26587)
+++ app/pdb/undo-cmds.c	(working copy)
@@ -67,7 +67,7 @@ image_undo_group_start_invoker (GimpProc
         gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_MISC, undo_desc);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -94,7 +94,7 @@ image_undo_group_end_invoker (GimpProced
         gimp_image_undo_group_end (image);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -117,7 +117,7 @@ image_undo_is_enabled_invoker (GimpProce
       enabled = gimp_image_undo_is_enabled (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], enabled);
@@ -153,7 +153,7 @@ image_undo_disable_invoker (GimpProcedur
         disabled = gimp_image_undo_disable (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], disabled);
@@ -189,7 +189,7 @@ image_undo_enable_invoker (GimpProcedure
         enabled = gimp_image_undo_enable (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], enabled);
@@ -225,7 +225,7 @@ image_undo_freeze_invoker (GimpProcedure
         frozen = gimp_image_undo_freeze (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], frozen);
@@ -261,7 +261,7 @@ image_undo_thaw_invoker (GimpProcedure  
         thawed = gimp_image_undo_thaw (image);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], thawed);
Index: app/pdb/channel-cmds.c
===================================================================
--- app/pdb/channel-cmds.c	(revision 26587)
+++ app/pdb/channel-cmds.c	(working copy)
@@ -75,7 +75,7 @@ channel_new_invoker (GimpProcedure      
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_channel (&return_vals->values[1], channel);
@@ -114,7 +114,7 @@ channel_new_from_component_invoker (Gimp
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_channel (&return_vals->values[1], channel);
@@ -146,7 +146,7 @@ channel_copy_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_channel (&return_vals->values[1], channel_copy);
@@ -181,7 +181,7 @@ channel_combine_masks_invoker (GimpProce
       gimp_channel_combine_mask (channel1, channel2, operation, offx, offy);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -204,7 +204,7 @@ channel_get_show_masked_invoker (GimpPro
       show_masked = gimp_channel_get_show_masked (channel);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], show_masked);
@@ -232,7 +232,7 @@ channel_set_show_masked_invoker (GimpPro
       gimp_channel_set_show_masked (channel, show_masked);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -255,7 +255,7 @@ channel_get_opacity_invoker (GimpProcedu
       opacity = gimp_channel_get_opacity (channel) * 100;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], opacity);
@@ -283,7 +283,7 @@ channel_set_opacity_invoker (GimpProcedu
       gimp_channel_set_opacity (channel, opacity / 100.0, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -307,7 +307,7 @@ channel_get_color_invoker (GimpProcedure
       gimp_rgb_set_alpha (&color, 1.0);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_rgb (&return_vals->values[1], &color);
@@ -338,7 +338,7 @@ channel_set_color_invoker (GimpProcedure
       gimp_channel_set_color (channel, &rgb_color, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/buffer-cmds.c
===================================================================
--- app/pdb/buffer-cmds.c	(revision 26587)
+++ app/pdb/buffer-cmds.c	(working copy)
@@ -60,7 +60,7 @@ buffers_get_list_invoker (GimpProcedure 
                                                             filter, &num_buffers);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -101,7 +101,7 @@ buffer_rename_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], real_name);
@@ -132,7 +132,7 @@ buffer_delete_invoker (GimpProcedure    
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -160,7 +160,7 @@ buffer_get_width_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], width);
@@ -193,7 +193,7 @@ buffer_get_height_invoker (GimpProcedure
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], height);
@@ -226,7 +226,7 @@ buffer_get_bytes_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], bytes);
@@ -259,7 +259,7 @@ buffer_get_image_type_invoker (GimpProce
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_enum (&return_vals->values[1], image_type);
Index: app/pdb/pattern-cmds.c
===================================================================
--- app/pdb/pattern-cmds.c	(revision 26587)
+++ app/pdb/pattern-cmds.c	(working copy)
@@ -69,7 +69,7 @@ pattern_get_info_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -118,7 +118,7 @@ pattern_get_pixels_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
Index: app/pdb/message-cmds.c
===================================================================
--- app/pdb/message-cmds.c	(revision 26587)
+++ app/pdb/message-cmds.c	(working copy)
@@ -61,7 +61,7 @@ message_invoker (GimpProcedure      *pro
                          domain, message);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -77,7 +77,7 @@ message_get_handler_invoker (GimpProcedu
 
   handler = gimp->message_handler;
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_enum (&return_vals->values[1], handler);
 
   return return_vals;
@@ -101,7 +101,7 @@ message_set_handler_invoker (GimpProcedu
       gimp->message_handler = handler;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/edit-cmds.c
===================================================================
--- app/pdb/edit-cmds.c	(revision 26587)
+++ app/pdb/edit-cmds.c	(working copy)
@@ -82,7 +82,7 @@ edit_cut_invoker (GimpProcedure      *pr
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], non_empty);
@@ -125,7 +125,7 @@ edit_copy_invoker (GimpProcedure      *p
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], non_empty);
@@ -162,7 +162,7 @@ edit_copy_visible_invoker (GimpProcedure
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], non_empty);
@@ -203,7 +203,7 @@ edit_paste_invoker (GimpProcedure      *
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], floating_sel);
@@ -235,7 +235,7 @@ edit_paste_as_new_invoker (GimpProcedure
       image = NULL;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], image);
@@ -285,7 +285,7 @@ edit_named_cut_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], real_name);
@@ -335,7 +335,7 @@ edit_named_copy_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], real_name);
@@ -379,7 +379,7 @@ edit_named_copy_visible_invoker (GimpPro
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], real_name);
@@ -422,7 +422,7 @@ edit_named_paste_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], floating_sel);
@@ -460,7 +460,7 @@ edit_named_paste_as_new_invoker (GimpPro
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], image);
@@ -493,7 +493,7 @@ edit_clear_invoker (GimpProcedure      *
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -524,7 +524,7 @@ edit_fill_invoker (GimpProcedure      *p
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -575,7 +575,7 @@ edit_bucket_fill_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -630,7 +630,7 @@ edit_bucket_fill_full_invoker (GimpProce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -711,7 +711,7 @@ edit_blend_invoker (GimpProcedure      *
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -746,7 +746,7 @@ edit_stroke_invoker (GimpProcedure      
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -783,7 +783,7 @@ edit_stroke_vectors_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/vectors-cmds.c
===================================================================
--- app/pdb/vectors-cmds.c	(revision 26587)
+++ app/pdb/vectors-cmds.c	(working copy)
@@ -65,7 +65,7 @@ vectors_is_valid_invoker (GimpProcedure 
   valid = (GIMP_IS_VECTORS (vectors) &&
            ! gimp_item_is_removed (GIMP_ITEM (vectors)));
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_boolean (&return_vals->values[1], valid);
 
   return return_vals;
@@ -93,7 +93,7 @@ vectors_new_invoker (GimpProcedure      
       vectors = gimp_vectors_new (image, name);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_vectors (&return_vals->values[1], vectors);
@@ -136,7 +136,7 @@ vectors_new_from_text_layer_invoker (Gim
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_vectors (&return_vals->values[1], vectors);
@@ -168,7 +168,7 @@ vectors_copy_invoker (GimpProcedure     
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_vectors (&return_vals->values[1], vectors_copy);
@@ -196,7 +196,7 @@ vectors_get_image_invoker (GimpProcedure
       image = gimp_item_get_image (GIMP_ITEM (vectors));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_image (&return_vals->values[1], image);
@@ -224,7 +224,7 @@ vectors_get_name_invoker (GimpProcedure 
       name = g_strdup (gimp_object_get_name (GIMP_OBJECT (vectors)));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -252,7 +252,7 @@ vectors_set_name_invoker (GimpProcedure 
       success = gimp_item_rename (GIMP_ITEM (vectors), name, error);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -275,7 +275,7 @@ vectors_get_visible_invoker (GimpProcedu
       visible = gimp_item_get_visible (GIMP_ITEM (vectors));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], visible);
@@ -303,7 +303,7 @@ vectors_set_visible_invoker (GimpProcedu
       gimp_item_set_visible (GIMP_ITEM (vectors), visible, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -326,7 +326,7 @@ vectors_get_linked_invoker (GimpProcedur
       linked = gimp_item_get_linked (GIMP_ITEM (vectors));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_boolean (&return_vals->values[1], linked);
@@ -354,7 +354,7 @@ vectors_set_linked_invoker (GimpProcedur
       gimp_item_set_linked (GIMP_ITEM (vectors), linked, TRUE);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -377,7 +377,7 @@ vectors_get_tattoo_invoker (GimpProcedur
       tattoo = gimp_item_get_tattoo (GIMP_ITEM (vectors));
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], tattoo);
@@ -405,7 +405,7 @@ vectors_set_tattoo_invoker (GimpProcedur
       gimp_item_set_tattoo (GIMP_ITEM (vectors), tattoo);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -445,7 +445,7 @@ vectors_get_strokes_invoker (GimpProcedu
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -485,7 +485,7 @@ vectors_stroke_get_length_invoker (GimpP
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_double (&return_vals->values[1], length);
@@ -534,7 +534,7 @@ vectors_stroke_get_point_at_dist_invoker
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -572,7 +572,7 @@ vectors_remove_stroke_invoker (GimpProce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -600,7 +600,7 @@ vectors_stroke_close_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -632,7 +632,7 @@ vectors_stroke_translate_invoker (GimpPr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -664,7 +664,7 @@ vectors_stroke_scale_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -698,7 +698,7 @@ vectors_stroke_rotate_invoker (GimpProce
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -730,7 +730,7 @@ vectors_stroke_flip_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -766,7 +766,7 @@ vectors_stroke_flip_free_invoker (GimpPr
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -823,7 +823,7 @@ vectors_stroke_get_points_invoker (GimpP
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -892,7 +892,7 @@ vectors_stroke_new_from_points_invoker (
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], stroke_id);
@@ -952,7 +952,7 @@ vectors_stroke_interpolate_invoker (Gimp
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -996,7 +996,7 @@ vectors_bezier_stroke_new_moveto_invoker
       stroke_id = gimp_stroke_get_ID (stroke);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], stroke_id);
@@ -1040,7 +1040,7 @@ vectors_bezier_stroke_lineto_invoker (Gi
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1087,7 +1087,7 @@ vectors_bezier_stroke_conicto_invoker (G
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1142,7 +1142,7 @@ vectors_bezier_stroke_cubicto_invoker (G
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1183,7 +1183,7 @@ vectors_bezier_stroke_new_ellipse_invoke
       stroke_id = gimp_stroke_get_ID (stroke);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], stroke_id);
@@ -1232,7 +1232,7 @@ vectors_to_selection_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1283,7 +1283,7 @@ vectors_import_from_file_invoker (GimpPr
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1344,7 +1344,7 @@ vectors_import_from_string_invoker (Gimp
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -1377,7 +1377,7 @@ vectors_export_to_file_invoker (GimpProc
       success = gimp_vectors_export_file (image, vectors, filename, error);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -1404,7 +1404,7 @@ vectors_export_to_string_invoker (GimpPr
       success = (string != NULL);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], string);
Index: app/pdb/pattern-select-cmds.c
===================================================================
--- app/pdb/pattern-select-cmds.c	(revision 26587)
+++ app/pdb/pattern-select-cmds.c	(working copy)
@@ -61,7 +61,7 @@ patterns_popup_invoker (GimpProcedure   
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -86,7 +86,7 @@ patterns_close_popup_invoker (GimpProced
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -114,7 +114,7 @@ patterns_set_popup_invoker (GimpProcedur
         success = FALSE;
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/fileops-cmds.c
===================================================================
--- app/pdb/fileops-cmds.c	(revision 26587)
+++ app/pdb/fileops-cmds.c	(working copy)
@@ -66,7 +66,7 @@ file_load_invoker (GimpProcedure      *p
                                     error);
 
   if (! uri)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   file_proc =
     file_procedure_find (gimp->plug_in_manager->load_procs, uri, error);
@@ -74,7 +74,7 @@ file_load_invoker (GimpProcedure      *p
   g_free (uri);
 
   if (! file_proc)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   proc = GIMP_PROCEDURE (file_proc);
 
@@ -153,7 +153,7 @@ file_load_layer_invoker (GimpProcedure  
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_layer (&return_vals->values[1], layer);
@@ -217,7 +217,7 @@ file_load_layers_invoker (GimpProcedure 
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -248,7 +248,7 @@ file_save_invoker (GimpProcedure      *p
                                     error);
 
   if (! uri)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   file_proc =
     file_procedure_find (gimp->plug_in_manager->save_procs, uri, error);
@@ -256,7 +256,7 @@ file_save_invoker (GimpProcedure      *p
   g_free (uri);
 
   if (! file_proc)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   proc = GIMP_PROCEDURE (file_proc);
 
@@ -316,7 +316,7 @@ file_load_thumbnail_invoker (GimpProcedu
         success = FALSE;
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     {
@@ -349,7 +349,7 @@ file_save_thumbnail_invoker (GimpProcedu
       success = file_utils_save_thumbnail (image, filename);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -372,7 +372,7 @@ temp_name_invoker (GimpProcedure      *p
       name = gimp_get_temp_filename (gimp, extension);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_take_string (&return_vals->values[1], name);
@@ -410,7 +410,7 @@ register_magic_load_handler_invoker (Gim
       g_free (canonical);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -441,7 +441,7 @@ register_load_handler_invoker (GimpProce
       g_free (canonical);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -472,7 +472,7 @@ register_save_handler_invoker (GimpProce
       g_free (canonical);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -500,7 +500,7 @@ register_file_handler_mime_invoker (Gimp
       g_free (canonical);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -530,7 +530,7 @@ register_thumbnail_loader_invoker (GimpP
       g_free (canon_thumb);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/display-cmds.c
===================================================================
--- app/pdb/display-cmds.c	(revision 26587)
+++ app/pdb/display-cmds.c	(working copy)
@@ -50,7 +50,7 @@ display_is_valid_invoker (GimpProcedure 
 
   valid = (display != NULL);
 
-  return_vals = gimp_procedure_get_return_values (procedure, TRUE);
+  return_vals = gimp_procedure_get_return_values (procedure, TRUE, NULL);
   g_value_set_boolean (&return_vals->values[1], valid);
 
   return return_vals;
@@ -89,7 +89,7 @@ display_new_invoker (GimpProcedure      
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_display (&return_vals->values[1], display);
@@ -115,7 +115,7 @@ display_delete_invoker (GimpProcedure   
       gimp_delete_display (gimp, display);
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 static GValueArray *
@@ -138,7 +138,7 @@ display_get_window_handle_invoker (GimpP
       window = (gint32) gimp_get_display_window (gimp, display);
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     g_value_set_int (&return_vals->values[1], window);
@@ -156,7 +156,7 @@ displays_flush_invoker (GimpProcedure   
 {
   gimp_container_foreach (gimp->images, (GFunc) gimp_image_flush, NULL);
 
-  return gimp_procedure_get_return_values (procedure, TRUE);
+  return gimp_procedure_get_return_values (procedure, TRUE, NULL);
 }
 
 static GValueArray *
@@ -190,7 +190,7 @@ displays_reconnect_invoker (GimpProcedur
         }
     }
 
-  return gimp_procedure_get_return_values (procedure, success);
+  return gimp_procedure_get_return_values (procedure, success, *error);
 }
 
 void
Index: app/pdb/transform-tools-cmds.c
===================================================================
--- app/pdb/transform-tools-cmds.c	(revision 26587)
+++ app/pdb/transform-tools-cmds.c	(working copy)
@@ -73,7 +73,7 @@ flip_invoker (GimpProcedure      *proced
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -156,7 +156,7 @@ perspective_invoker (GimpProcedure      
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -224,7 +224,7 @@ rotate_invoker (GimpProcedure      *proc
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -299,7 +299,7 @@ scale_invoker (GimpProcedure      *proce
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -369,7 +369,7 @@ shear_invoker (GimpProcedure      *proce
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
@@ -443,7 +443,7 @@ transform_2d_invoker (GimpProcedure     
         }
     }
 
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 
   if (success)
     gimp_value_set_drawable (&return_vals->values[1], drawable);
Index: app/plug-in/gimppluginprocframe.c
===================================================================
--- app/plug-in/gimppluginprocframe.c	(revision 26587)
+++ app/plug-in/gimppluginprocframe.c	(working copy)
@@ -173,7 +173,7 @@ gimp_plug_in_proc_frame_get_return_vals 
         {
           /* Allocate new return values of the correct size. */
           return_vals = gimp_procedure_get_return_values (proc_frame->procedure,
-                                                          FALSE);
+                                                          TRUE, NULL);
 
           /* Copy all of the arguments we can. */
           memcpy (return_vals->values, proc_frame->return_vals->values,
@@ -191,9 +191,9 @@ gimp_plug_in_proc_frame_get_return_vals 
     }
   else
     {
-      /* Just return a dummy set of values. */
+      /*  Assume an execution error.  */
       return_vals = gimp_procedure_get_return_values (proc_frame->procedure,
-                                                      FALSE);
+                                                      FALSE, NULL);
     }
 
   return return_vals;
Index: app/plug-in/gimppluginmanager-call.c
===================================================================
--- app/plug-in/gimppluginmanager-call.c	(revision 26587)
+++ app/plug-in/gimppluginmanager-call.c	(working copy)
@@ -41,6 +41,7 @@
 #include "gimpplugin.h"
 #include "gimpplugin-message.h"
 #include "gimpplugindef.h"
+#include "gimppluginerror.h"
 #include "gimppluginmanager.h"
 #define __YES_I_NEED_GIMP_PLUG_IN_MANAGER_CALL__
 #include "gimppluginmanager-call.h"
@@ -140,7 +141,6 @@ gimp_plug_in_manager_call_run (GimpPlugI
                                GimpPlugInProcedure *procedure,
                                GValueArray         *args,
                                gboolean             synchronous,
-                               gboolean             destroy_return_vals,
                                GimpObject          *display)
 {
   GValueArray *return_vals = NULL;
@@ -167,8 +167,19 @@ gimp_plug_in_manager_call_run (GimpPlugI
 
       if (! gimp_plug_in_open (plug_in, GIMP_PLUG_IN_CALL_RUN, FALSE))
         {
+          const gchar *name  = gimp_object_get_name (GIMP_OBJECT (plug_in));
+          GError      *error = g_error_new (GIMP_PLUG_IN_ERROR,
+                                            GIMP_PLUG_IN_EXECUTION_FAILED,
+                                            _("Failed to run plug-in \"%s\""),
+                                            name);
+
           g_object_unref (plug_in);
-          goto done;
+
+          return_vals = gimp_procedure_get_return_values (GIMP_PROCEDURE (procedure),
+                                                          FALSE, error);
+          g_error_free (error);
+
+          return return_vals;
         }
 
       display_ID = display ? gimp_get_display_ID (manager->gimp, display) : -1;
@@ -206,14 +217,22 @@ gimp_plug_in_manager_call_run (GimpPlugI
           ! gp_proc_run_write (plug_in->my_write, &proc_run, plug_in) ||
           ! gimp_wire_flush (plug_in->my_write, plug_in))
         {
+          const gchar *name  = gimp_object_get_name (GIMP_OBJECT (plug_in));
+          GError      *error = g_error_new (GIMP_PLUG_IN_ERROR,
+                                            GIMP_PLUG_IN_EXECUTION_FAILED,
+                                            _("Failed to run plug-in \"%s\""),
+                                            name);
+
           g_free (config.display_name);
           g_free (proc_run.params);
 
-          return_vals =
-            gimp_procedure_get_return_values (GIMP_PROCEDURE (procedure), FALSE);
-
           g_object_unref (plug_in);
-          goto done;
+
+          return_vals = gimp_procedure_get_return_values (GIMP_PROCEDURE (procedure),
+                                                          FALSE, error);
+          g_error_free (error);
+
+          return return_vals;
         }
 
       g_free (config.display_name);
@@ -260,13 +279,6 @@ gimp_plug_in_manager_call_run (GimpPlugI
       g_object_unref (plug_in);
     }
 
- done:
-  if (return_vals && destroy_return_vals)
-    {
-      g_value_array_free (return_vals);
-      return_vals = NULL;
-    }
-
   return return_vals;
 }
 
@@ -277,8 +289,7 @@ gimp_plug_in_manager_call_run_temp (Gimp
                                     GimpTemporaryProcedure *procedure,
                                     GValueArray            *args)
 {
-  GValueArray *return_vals = NULL;
-  GimpPlugIn  *plug_in;
+  GimpPlugIn *plug_in;
 
   g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -291,6 +302,7 @@ gimp_plug_in_manager_call_run_temp (Gimp
   if (plug_in)
     {
       GimpPlugInProcFrame *proc_frame;
+      GValueArray         *return_vals;
       GPProcRun            proc_run;
 
       proc_frame = gimp_plug_in_proc_frame_push (plug_in, context, progress,
@@ -303,13 +315,20 @@ gimp_plug_in_manager_call_run_temp (Gimp
       if (! gp_temp_proc_run_write (plug_in->my_write, &proc_run, plug_in) ||
           ! gimp_wire_flush (plug_in->my_write, plug_in))
         {
+          const gchar *name  = gimp_object_get_name (GIMP_OBJECT (plug_in));
+          GError      *error = g_error_new (GIMP_PLUG_IN_ERROR,
+                                            GIMP_PLUG_IN_EXECUTION_FAILED,
+                                            _("Failed to run plug-in \"%s\""),
+                                            name);
+
           g_free (proc_run.params);
           gimp_plug_in_proc_frame_pop (plug_in);
 
-          return_vals =
-            gimp_procedure_get_return_values (GIMP_PROCEDURE (procedure), FALSE);
+          return_vals = gimp_procedure_get_return_values (GIMP_PROCEDURE (procedure),
+                                                          FALSE, error);
+          g_error_free (error);
 
-          goto done;
+          return return_vals;
         }
 
       g_free (proc_run.params);
@@ -327,8 +346,13 @@ gimp_plug_in_manager_call_run_temp (Gimp
 
       gimp_plug_in_proc_frame_unref (proc_frame, plug_in);
       g_object_unref (plug_in);
-    }
 
- done:
-  return return_vals;
+      return return_vals;
+    }
+  else
+    {
+      /*  can we actually ever get here?  */
+      return gimp_procedure_get_return_values (GIMP_PROCEDURE (procedure),
+                                               FALSE, NULL);
+    }
 }
Index: app/plug-in/gimppluginmanager-call.h
===================================================================
--- app/plug-in/gimppluginmanager-call.h	(revision 26587)
+++ app/plug-in/gimppluginmanager-call.h	(working copy)
@@ -46,7 +46,6 @@ GValueArray * gimp_plug_in_manager_call_
                                                   GimpPlugInProcedure    *procedure,
                                                   GValueArray            *args,
                                                   gboolean                synchronous,
-                                                  gboolean                destroy_return_vals,
                                                   GimpObject             *display);
 
 /*  Run a temp plug-in proc as if it were a procedure database procedure
Index: app/plug-in/gimpplugin-message.c
===================================================================
--- app/plug-in/gimpplugin-message.c	(revision 26587)
+++ app/plug-in/gimpplugin-message.c	(working copy)
@@ -37,8 +37,9 @@
 #include "core/gimpdrawable.h"
 #include "core/gimpdrawable-shadow.h"
 
-#include "pdb/gimppdb.h"
 #include "pdb/gimp-pdb-compat.h"
+#include "pdb/gimppdb.h"
+#include "pdb/gimppdberror.h"
 
 #include "gimpplugin.h"
 #include "gimpplugin-cleanup.h"
@@ -502,11 +503,23 @@ gimp_plug_in_handle_proc_run (GimpPlugIn
 
   if (error)
     {
-      gimp_message (plug_in->manager->gimp, G_OBJECT (proc_frame->progress),
-                    GIMP_MESSAGE_ERROR,
-                    _("PDB calling error for procedure '%s':\n"
-                      "%s"),
-                    canonical, error->message);
+      if (error->domain == GIMP_PDB_ERROR)
+        {
+          gimp_message (plug_in->manager->gimp, G_OBJECT (proc_frame->progress),
+                        GIMP_MESSAGE_ERROR,
+                        _("PDB calling error for procedure '%s':\n"
+                          "%s"),
+                        canonical, error->message);
+        }
+      else
+        {
+          gimp_message (plug_in->manager->gimp, G_OBJECT (proc_frame->progress),
+                        GIMP_MESSAGE_ERROR,
+                        _("PDB execution error for procedure '%s':\n"
+                          "%s"),
+                        canonical, error->message);
+        }
+
       g_error_free (error);
     }
 
Index: app/plug-in/gimpplugin-progress.c
===================================================================
--- app/plug-in/gimpplugin-progress.c	(revision 26587)
+++ app/plug-in/gimpplugin-progress.c	(working copy)
@@ -30,12 +30,15 @@
 #include "core/gimpprogress.h"
 
 #include "pdb/gimppdb.h"
+#include "pdb/gimppdberror.h"
 
 #include "gimpplugin.h"
 #include "gimpplugin-progress.h"
 #include "gimppluginmanager.h"
 #include "gimptemporaryprocedure.h"
 
+#include "gimp-intl.h"
+
 
 /*  local function prototypes  */
 
@@ -326,10 +329,13 @@ gimp_plug_in_progress_cancel_callback (G
 
   if (proc_frame->main_loop)
     {
-      proc_frame->return_vals = gimp_procedure_get_return_values (NULL,
-                                                                  FALSE);
+      GError *error = g_error_new (GIMP_PDB_ERROR, GIMP_PDB_CALL_CANCELLED,
+                                   "%s", _("Cancelled"));
+
+      proc_frame->return_vals =
+        gimp_procedure_get_return_values (proc_frame->procedure, FALSE, error);
 
-      g_value_set_enum (proc_frame->return_vals->values, GIMP_PDB_CANCEL);
+      g_error_free (error);
     }
 
   for (list = plug_in->temp_proc_frames; list; list = g_list_next (list))
@@ -338,8 +344,12 @@ gimp_plug_in_progress_cancel_callback (G
 
       if (proc_frame->main_loop)
         {
-          proc_frame->return_vals = gimp_procedure_get_return_values (NULL,
-                                                                      FALSE);
+          GError *error = g_error_new (GIMP_PDB_ERROR, GIMP_PDB_CALL_CANCELLED,
+                                       "%s", _("Cancelled"));
+
+          proc_frame->return_vals =
+            gimp_procedure_get_return_values (proc_frame->procedure,
+                                              FALSE, error);
 
           g_value_set_enum (proc_frame->return_vals->values, GIMP_PDB_CANCEL);
         }
Index: app/plug-in/gimppluginprocedure.c
===================================================================
--- app/plug-in/gimppluginprocedure.c	(revision 26587)
+++ app/plug-in/gimppluginprocedure.c	(working copy)
@@ -212,7 +212,7 @@ gimp_plug_in_procedure_execute (GimpProc
   return gimp_plug_in_manager_call_run (gimp->plug_in_manager,
                                         context, progress,
                                         GIMP_PLUG_IN_PROCEDURE (procedure),
-                                        args, TRUE, FALSE, NULL);
+                                        args, TRUE, NULL);
 }
 
 static void
@@ -223,10 +223,19 @@ gimp_plug_in_procedure_execute_async (Gi
                                       GValueArray   *args,
                                       GimpObject    *display)
 {
-  gimp_plug_in_manager_call_run (gimp->plug_in_manager,
-                                 context, progress,
-                                 GIMP_PLUG_IN_PROCEDURE (procedure),
-                                 args, FALSE, TRUE, display);
+  GimpPlugInProcedure *plug_in_procedure = GIMP_PLUG_IN_PROCEDURE (procedure);
+  GValueArray         *return_vals;
+
+  return_vals = gimp_plug_in_manager_call_run (gimp->plug_in_manager,
+                                               context, progress,
+                                               plug_in_procedure,
+                                               args, FALSE, display);
+
+  /*  In case of errors, gimp_plug_in_manager_call_run() may return
+   *  return_vals, even if run asynchronously.
+   */
+  if (return_vals)
+    g_value_array_free (return_vals);
 }
 
 const gchar *
Index: tools/pdbgen/app.pl
===================================================================
--- tools/pdbgen/app.pl	(revision 26587)
+++ tools/pdbgen/app.pl	(working copy)
@@ -130,7 +130,7 @@ sub marshal_outargs {
     my $proc = shift;
 
     my $result = <<CODE;
-  return_vals = gimp_procedure_get_return_values (procedure, success);
+  return_vals = gimp_procedure_get_return_values (procedure, success, *error);
 CODE
 
     my $argc = 0;
@@ -183,7 +183,7 @@ CODE
 	}
     }
 
-    $result =~ s/, success\);$/, TRUE);/m unless $success;
+    $result =~ s/, success, \*error\);$/, TRUE, NULL);/m unless $success;
     $result;
 }
 
Index: tools/pdbgen/pdb/fileops.pdb
===================================================================
--- tools/pdbgen/pdb/fileops.pdb	(revision 26587)
+++ tools/pdbgen/pdb/fileops.pdb	(working copy)
@@ -63,7 +63,7 @@ HELP
                                     error);
 
   if (! uri)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   file_proc =
     file_procedure_find (gimp->plug_in_manager->load_procs, uri, error);
@@ -71,7 +71,7 @@ HELP
   g_free (uri);
 
   if (! file_proc)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   proc = GIMP_PROCEDURE (file_proc);
 
@@ -276,7 +276,7 @@ HELP
                                     error);
 
   if (! uri)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   file_proc =
     file_procedure_find (gimp->plug_in_manager->save_procs, uri, error);
@@ -284,7 +284,7 @@ HELP
   g_free (uri);
 
   if (! file_proc)
-    return gimp_procedure_get_return_values (procedure, FALSE);
+    return gimp_procedure_get_return_values (procedure, FALSE, *error);
 
   proc = GIMP_PROCEDURE (file_proc);
 
Index: plug-ins/pygimp/pygimp-pdb.c
===================================================================
--- plug-ins/pygimp/pygimp-pdb.c	(revision 26587)
+++ plug-ins/pygimp/pygimp-pdb.c	(working copy)
@@ -620,9 +620,7 @@ static PyMethodDef pdb_methods[] = {
 PyObject *
 pygimp_pdb_new(void)
 {
-    PyGimpPDB *self;
-	
-    self = PyObject_NEW(PyGimpPDB, &PyGimpPDB_Type);
+    PyGimpPDB *self = PyObject_NEW(PyGimpPDB, &PyGimpPDB_Type);
 
     if (self == NULL)
 	return NULL;
@@ -929,8 +927,11 @@ pf_call(PyGimpPDBFunction *self, PyObjec
 #if PG_DEBUG > 0
 	g_printerr("execution error\n");
 #endif
+        if (ret[1].type == GIMP_PDB_STRING)
+	  PyErr_SetString(PyExc_RuntimeError, ret[1].data.d_string);
+        else
+          PyErr_SetString(PyExc_RuntimeError, "execution error");
 	gimp_destroy_params(ret, nret);
-	PyErr_SetString(PyExc_RuntimeError, "execution error");
 	return NULL;
 	break;
 
@@ -938,8 +939,11 @@ pf_call(PyGimpPDBFunction *self, PyObjec
 #if PG_DEBUG > 0
 	g_printerr("calling error\n");
 #endif
+        if (ret[1].type == GIMP_PDB_STRING)
+	  PyErr_SetString(PyExc_RuntimeError, ret[1].data.d_string);
+        else
+          PyErr_SetString(PyExc_RuntimeError, "calling error");
 	gimp_destroy_params(ret, nret);
-	PyErr_SetString(PyExc_TypeError, "invalid arguments");
 	return NULL;
 	break;
 
