app/pdb/gimppdberror.h added generic error codes.

2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimppdberror.h
	* app/plug-in/gimppluginerror.h: added generic error codes.

	* app/pdb/gimpprocedure.c
	* app/plug-in/gimppluginprocedure.c: use the GIMP_PDB_ERROR and
	GIMP_PLUG_IN_ERROR domains.


svn path=/trunk/; revision=27626
This commit is contained in:
Sven Neumann 2008-11-12 10:06:07 +00:00 committed by Sven Neumann
parent d85d7ac785
commit 33eb18a479
5 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2008-11-12 Sven Neumann <sven@gimp.org>
* app/pdb/gimppdberror.h
* app/plug-in/gimppluginerror.h: added generic error codes.
* app/pdb/gimpprocedure.c
* app/plug-in/gimppluginprocedure.c: use the GIMP_PDB_ERROR and
GIMP_PLUG_IN_ERROR domains.
2008-11-12 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimptransformtool.c: Align static function prototypes.

View File

@ -22,10 +22,11 @@
typedef enum
{
GIMP_PDB_FAILED, /* generic error condition */
GIMP_PDB_CANCELLED,
GIMP_PDB_PROCEDURE_NOT_FOUND,
GIMP_PDB_INVALID_ARGUMENT,
GIMP_PDB_INVALID_RETURN_VALUE,
GIMP_PDB_CANCELLED,
GIMP_PDB_INTERNAL_ERROR
} GimpPdbErrorCode;

View File

@ -346,7 +346,7 @@ gimp_procedure_execute (GimpProcedure *procedure,
if (return_vals->n_values > 1 &&
G_VALUE_HOLDS_STRING (&return_vals->values[1]))
{
g_set_error_literal (error, 0, 0,
g_set_error_literal (error, GIMP_PDB_ERROR, GIMP_PDB_FAILED,
g_value_get_string (&return_vals->values[1]));
}
}

View File

@ -22,6 +22,7 @@
typedef enum
{
GIMP_PLUG_IN_FAILED, /* generic error condition */
GIMP_PLUG_IN_EXECUTION_FAILED,
GIMP_PLUG_IN_NOT_FOUND
} GimpPlugInErrorCode;

View File

@ -36,6 +36,8 @@
#define __YES_I_NEED_GIMP_PLUG_IN_MANAGER_CALL__
#include "gimppluginmanager-call.h"
#include "gimppluginerror.h"
#include "gimppluginprocedure.h"
#include "plug-in-menu-path.h"
@ -349,7 +351,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
{
basename = g_filename_display_basename (proc->prog);
g_set_error (error, 0, 0,
g_set_error (error, GIMP_PLUG_IN_ERROR, GIMP_PLUG_IN_FAILED,
"Plug-In \"%s\"\n(%s)\n"
"attempted to install procedure \"%s\"\n"
"in the invalid menu location \"%s\".\n"
@ -469,7 +471,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
{
basename = g_filename_display_basename (proc->prog);
g_set_error (error, 0, 0,
g_set_error (error, GIMP_PLUG_IN_ERROR, GIMP_PLUG_IN_FAILED,
"Plug-In \"%s\"\n(%s)\n"
"attempted to install procedure \"%s\" "
"in the invalid menu location \"%s\".\n"
@ -505,7 +507,7 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure *proc,
basename = g_filename_display_basename (proc->prog);
g_set_error (error, 0, 0,
g_set_error (error, GIMP_PLUG_IN_ERROR, GIMP_PLUG_IN_FAILED,
"Plug-In \"%s\"\n(%s)\n\n"
"attempted to install %s procedure \"%s\" "
"which does not take the standard %s Plug-In "