[x265] Catch exceptions in main()?

Steve Borho steve at borho.org
Wed Sep 18 20:27:07 CEST 2013


On Wed, Sep 18, 2013 at 8:33 AM, SF Markus Elfring <
elfring at users.sourceforge.net> wrote:

> Hello,
>
> I expect that exception handling is usually supported by a C++ program.
> I wonder why your function "main" does not contain corresponding try and
> catch
> instructions so far.
>
> https://bitbucket.org/multicoreware/x265/src/d11de33521cf/source/x265.cpp#cl-481
>
> How do you think about descriptions from software developers like the
> following?
> - Matthew Wilson
>   http://accu.org/index.php/journals/1706
>
> - Danny Kalev
>   http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=108


Interesting point.

Our library does not define any exceptions, nor does it explicitly throw
any.  So the only exceptions emitted by the library will be divide-by-zero
and other things that indicate bugs that we probably don't want to catch
unless there was a way to report a stack trace or something else useful.

Most users of x265 will not use our CLI wrapper, they will use us as a
library and thus they would need to catch exceptions from our API calls at
whatever level is appropriate to them.

-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130918/b5051719/attachment.html>


More information about the x265-devel mailing list