[vlc-devel] [Patches] Dash: mostly cosmetics

Hugo Beauzée-Luyssen beauze.h at gmail.com
Wed Dec 7 13:30:14 CET 2011


On Wed, Dec 7, 2011 at 12:39 PM, Tobias Güntner <fatbull at web.de> wrote:
> Am 06.12.2011 13:43, schrieb Hugo Beauzée-Luyssen:
>
>> Most of the error handling could be done once and for all after the
>> parsing occurred.
>
>
> Hmmm.
>
> Is the parsing really done if supposedly simple getters can still fail
> because of errors in an input file? Aren't Attribute- and
> ElementNotPresentException actually (tree) parsing errors? Why do most
> getters return strings, although their names suggest otherwise? Why do
> getters returning numbers have to call atoi first, i.e. parse their own
> value? Shouldn't BasicCMParser take care of all these issues *before*
> creating MPD objects?
>

I was thinking about some missing elements. Some attributes are
mandatory and should indeed be parsed in the ctor, so the getter
doesn't have to run atoi.
Some getters return strings but shouldn't. Some patches I sent fix the
problem for a few of them, some other need to be fixed.
And indeed, the parser should run some input sanity check before
trying to use the elements themselves.

>
> Regards,
> Tobias
>

Regards,


-- 
Hugo Beauzée-Luyssen



More information about the vlc-devel mailing list