[Qt5-feedback] Qt5 and C++ exception

Дмитрий Б. dmitry_bsd at inbox.ru
Mon Jun 27 10:11:21 CEST 2011


I very much respect your opinion, but there is a part of community who believe that exceptions is very important.
In addition it is one of the standard of the C++ which Qt does not support on the API level and it is a standard for any object-oriented library at all.


27 июня 2011, 10:51 от <lars.knoll at nokia.com>:
> The short answer is no. Of course you can use exceptions in your own code
> together with Qt, but we don't intend of making their use mandatory (ie.
> make the Qt API depend upon them).
> 
> There's a couple of reasons for that. API compatibility is one of them,
> the other is related to the fact that we don't believe exceptions (in the
> general case) make code easier to read or handle and the third due to the
> fact that exceptions do not interact nicely with shared libraries on some
> platforms.
> 
> Cheers,
> Lars
> 
> On 6/27/11 8:26 AM, "ext Дмитрий Б." <dmitry_bsd at inbox.ru> wrote:
> 
> >Sorry guys if this question has already been discussed. Is any plans to
> >make changes in Qt-API to be able to use C++ exceptions, as in the other
> >frameworks?
> >Like this:
> >QThread* thread = new QThread();
> >try
> >{
> >    thread->start();
> >}
> >catch (e)
> >{
> >   //Error, thread has not been created
> >}
> >


More information about the Qt5-feedback mailing list