Re: error handling in GStreamer
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: Thomas Vander Stichele <thomas apestaart org>
- Cc: gnome-desktop-devel <desktop-devel-list gnome org>, GStreamer developers mailinglist <gstreamer-devel lists sf net>
- Subject: Re: error handling in GStreamer
- Date: Fri, 19 Sep 2003 17:06:26 +0200
Hi,
On Fri, 2003-09-19 at 16:33, Thomas Vander Stichele wrote:
> gst_element_gerror (GST_ERROR_DEVICE,
> g_strdup_printf (_("%s not accessible",
> device),
> g_strdup_printf ("no write permissions on %s",
> device));
I'd love to have a reference to the original element as well, so I
prefer gst_element_error (GstElement *element, GstErrorCategory cat,
gchar *user_error, gchar *developer_error);.
Also, can you make a macro for this please? I'd *hate* to see each
plugin using "gst_element_gerror (GST_ELEMENT (el), GST_ERROR_BLABLA,
g_strdup_printf("%s", "eek"), g_strdup_printf ("%d", state)); when you
could also use gst_element_merror (el, GST_ERROR_BLABLA, ("%s, "eek"),
("%d", state));, so that the macro is defined as:
#define gst_element_merror(el, cat, str, dbg) \
gst_element_gerror (GST_ELEMENT (el), (cat), \
g_strdup_printf (str), \
g_strdup_printf (dbg));
or whatever macro obfuscation is needed to make this work as it's meant
to.
It seems minor, but in the end, it'll save a lot of typing.
Apart from that, it seems fine. i18n and usability is good, but it's
also good to have technical error information if we need it. This seems
ok.
Ronald
--
Ronald Bultje <rbultje ronald bitfreak net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]