mirror of https://github.com/GNOME/gimp.git
app: do not use g_error() for non-fatale errors...
and g_warning() for programming errors only. Use g_printerr() for "normal" errors which may happen in a program lifetime (in particular corrupted XCF file errors are not necessarily programming errors).
This commit is contained in:
parent
7b69b3b60e
commit
ce2bb29605
|
@ -1791,11 +1791,13 @@ xcf_load_level (XcfInfo *info,
|
|||
fail = TRUE;
|
||||
break;
|
||||
case COMPRESS_FRACTAL:
|
||||
g_warning ("xcf: fractal compression unimplemented");
|
||||
g_printerr ("xcf: fractal compression unimplemented. "
|
||||
"Possibly corrupt XCF file.");
|
||||
fail = TRUE;
|
||||
break;
|
||||
default:
|
||||
g_warning ("xcf: unknown compression");
|
||||
g_printerr ("xcf: unknown compression. "
|
||||
"Possibly corrupt XCF file.");
|
||||
fail = TRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -2086,8 +2088,8 @@ xcf_load_parasite (XcfInfo *info)
|
|||
|
||||
if (size > MAX_XCF_PARASITE_DATA_LEN)
|
||||
{
|
||||
g_warning ("Maximum parasite data length (%ld bytes) exceeded. "
|
||||
"Possibly corrupt XCF file.", MAX_XCF_PARASITE_DATA_LEN);
|
||||
g_printerr ("Maximum parasite data length (%ld bytes) exceeded. "
|
||||
"Possibly corrupt XCF file.", MAX_XCF_PARASITE_DATA_LEN);
|
||||
g_free (name);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2166,7 +2168,7 @@ xcf_load_old_path (XcfInfo *info,
|
|||
}
|
||||
else if (version != 1)
|
||||
{
|
||||
g_warning ("Unknown path type. Possibly corrupt XCF file");
|
||||
g_printerr ("Unknown path type. Possibly corrupt XCF file");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1520,8 +1520,8 @@ xcf_save_level (XcfInfo *info,
|
|||
error));
|
||||
break;
|
||||
case COMPRESS_FRACTAL:
|
||||
g_error ("xcf: fractal compression unimplemented");
|
||||
break;
|
||||
g_warning ("xcf: fractal compression unimplemented");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* seek back to where we are to write out the next
|
||||
|
@ -1549,7 +1549,6 @@ xcf_save_level (XcfInfo *info,
|
|||
xcf_write_int32_check_error (info, &offset, 1);
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in New Issue