On Tue, Sep 23, 2008 at 03:31:17PM +0200, Benjamin Wolsey wrote:

> > > And it has the advantage of allowing a single debugging
> > > message telling you exactly what failed and where, instead of several
> > > that don't tell you very much.
> > 
> > This is an interesting point. I'm new to exceptions, dunno how appropriate
> > it'd be to use them as a logging mechanism.
> 
> It's the fact that it returns the error to the point that triggered it
> that I like, which as a side effect is good for logging.
> 
> > What I've learnt as a use for them was "exceptional behaviour".
> > How exceptional is for a media handler to NOT support a specific codec ?
> 
> I'd see it as a caller expecting to receive a decoder for data
> (AudioInfo or SoundInfo) that it passes to MediaHandler. If it can't get
> an object back because the data it passes is invalid, it's exceptional.

Please use only libmedia/MediaHandler.h as a document to read while
we discuss this.
I appreciate we're finally discussing the new design as that's important
to avoid to many rewrites.

For example, there's no SoundInfo passed to MediaHandler (by design).

That said, yes: I'm fine with it returning an exception if it can't
fullfill the request, with the request being: get me a decoder for
this [audio/video].

Now. If we go that way we must:

1) Update MediaHandler.h documentation
2) Update all users of it
3) Update all implementations

So I guess all we need to go on is now a word from Bastiaan, being
the one working on (2) and (3).

--strk;


_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to