<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 18, 2013 at 1:35 PM, Rafaël Carré <span dir="ltr"><<a href="mailto:funman@videolan.org" target="_blank">funman@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 18/09/2013 20:27, Steve Borho a écrit :<br>
<div><div class="h5">> On Wed, Sep 18, 2013 at 8:33 AM, SF Markus Elfring <<br>
> <a href="mailto:elfring@users.sourceforge.net">elfring@users.sourceforge.net</a>> wrote:<br>
><br>
>> Hello,<br>
>><br>
>> I expect that exception handling is usually supported by a C++ program.<br>
>> I wonder why your function "main" does not contain corresponding try and<br>
>> catch<br>
>> instructions so far.<br>
>><br>
>> <a href="https://bitbucket.org/multicoreware/x265/src/d11de33521cf/source/x265.cpp#cl-481" target="_blank">https://bitbucket.org/multicoreware/x265/src/d11de33521cf/source/x265.cpp#cl-481</a><br>
>><br>
>> How do you think about descriptions from software developers like the<br>
>> following?<br>
>> - Matthew Wilson<br>
>>   <a href="http://accu.org/index.php/journals/1706" target="_blank">http://accu.org/index.php/journals/1706</a><br>
>><br>
>> - Danny Kalev<br>
>>   <a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=108" target="_blank">http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=108</a><br>
><br>
><br>
> Interesting point.<br>
><br>
> Our library does not define any exceptions, nor does it explicitly throw<br>
> any.  So the only exceptions emitted by the library will be divide-by-zero<br>
> and other things that indicate bugs that we probably don't want to catch<br>
> unless there was a way to report a stack trace or something else useful.<br>
><br>
> Most users of x265 will not use our CLI wrapper, they will use us as a<br>
> library and thus they would need to catch exceptions from our API calls at<br>
> whatever level is appropriate to them.<br>
<br>
</div></div>The library is also usable from C code where exceptions can not be caught.</blockquote><div><br></div><div>Yes, very true.  So it really boils do to the question of whether we should catch them.  And if we do, what should we do with them? </div>
</div><div><br></div>-- <br>Steve Borho
</div></div>