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

Hugo Beauzée-Luyssen beauze.h at gmail.com
Wed Nov 30 16:55:43 CET 2011


Hi,

On Tue, Nov 29, 2011 at 1:13 PM, Tobias Güntner <fatbull at web.de> wrote:
> Am 29.11.2011 11:55, schrieb Hugo Beauzée-Luyssen:
>
>> On Tue, Nov 29, 2011 at 7:02 AM, Tobias Güntner<fatbull at web.de>  wrote:
>>>
>>> Am 28.11.2011 15:12, schrieb Hugo Beauzée-Luyssen:
>>>>
>>>>
>>>> I agree, but my plan was to remove all the exception, and therefore
>>>> the exceptions specifications.
>>>
>>>
>>> If you are going to remove *all* exceptions, you cannot use "new" or STL
>>> containers any more because those things can throw exceptions. You would
>>> have to rewrite almost everything. Is this really what you want?
>>>
>>> Probably not. You cannot ignore exceptions either, because unhandled
>>> exceptions will terminate() the program. So you *have* to catch them. And
>>> since you have to pay for exception handling anyway, you might as well
>>> use
>>> it.
>>>
>>> Regards,
>>> Tobias
>>>
>>
>> I disagree
>
>
> Well, I don't see an alternative. Did I miss anything?
>

Well the argument stating that "you don't want to do this" is wrong to
me. Otherwise we may want to rewrite Qt to catch those exceptions, for
instance. However, yes, we should check for std::bac_alloc everywhere,
or replacing new by new(nothrow) and check for NULL pointers.
My point about exceptions here was : they are not required, and can be
replaced by a (IMHO) cleaner solution, IE a proper return value.

>
>> but I don't think there much room for discussion since this
>> is your code. If you don't want it to be changed, then it won't be,
>> end of the story.
>
>
> You're mistaking me for someone else. It's not my code. ;) I'm just arguing
> for proper exception handling.

Woops, my apologies then.
However, my point is exposed in a more concise way just a few line up :)

Please find some other attached patches, that are not related to those
being discussed.


-- 
Hugo Beauzée-Luyssen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dash-MPD-manager-factory-fixing-a-potential-memory-l.patch
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111130/51a962a5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-dash-Don-t-hardcode-the-isLive-information.patch
Type: text/x-patch
Size: 5547 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20111130/51a962a5/attachment-0001.bin>


More information about the vlc-devel mailing list