[gst-devel] error explanation

Thomas Vander Stichele thomas at apestaart.org
Thu Jan 22 04:24:01 CET 2004


El jue, 22-01-2004 a las 04:10, David Schleef escribió:
> On Tue, Jan 20, 2004 at 11:46:21AM +0100, Thomas Vander Stichele wrote:
> > > - I'm not sure if abbreviating error domains and codes is a good idea.
> > > It's especially bad when grepping.
> > 
> > I like the short statements coming from it.  grepping doesn't make it
> > harder, since they always appear together.  Ie, you can grep for
> > "RESOURCE, READ" or "RESOURCE.*READ" if our style isn't fixed yet, and
> > get the same results as you would for GST_RESOURCE_ERROR_READ
> 
> I don't think abbreviations are a good idea, either.  It has
> bad namespace issues.  In particular, it requires a non-gstreamer
> plugin package (such as gst-science) to prefix all its private error
> codes with GST_, whereas it would normally use GSTSCI_.

We are talking about the same thing, right ? The enum still is full
form, ie GST_RESOURCE_ERROR_READ.  Only the macro uses shorthand and
expands it to this.  So I'm not really sure this really brings namespace
conflicts.

As for private error codes, the erroring system wasn't designed to get
hooks from other libraries on top of it.  The goal was to make the core
errors generic enough so they make sense to external plugins to use them
for the enums.

I guess I'm not sure what specifically you have problems with, so if you
could detail it a bit more with an example of what you want to do and
can't do now, that'd be great.

> > The goal here was to aim for making it so simple people stop wimping out
> > on actually having error statements in the code at all.
> 
> I think it's more likely that people don't use gst_element_error()
> because few of the elements use it currently.  Plus, we've been
> planning a transition for gst_element_error(), so why add stuff
> before the transition that will just need to be changed?

Oh, I'm fine with changing stuff - I just want to know what it is you
want changed and why.  I feel your terseness makes it hard for me to
know what you want :) As soon as I know what you want I can think and
discuss about it...

Thomas


Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
When you're on the outside baby and you can't get in
I will show you
you're so much better than you know
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list