[Qt5-feedback] new Qt5 - great! - but: What about exceptions?

Gábor Lehel illissius at gmail.com
Sat May 14 16:57:06 CEST 2011


On Sat, May 14, 2011 at 8:09 AM, Thiago Macieira <thiago at kde.org> wrote:
> On Friday, 13 de May de 2011 18:30:38 Keith Gardner wrote:
>> Sorry.  Boost exception supports the
>> N2179-style(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.h
>> tml) of exception objects.  They also have a wrapper function that is used
>> when calling throw to also include type information about the exception.
>> Once they make a copy of the exception, they then pass it around inside of
>> a shared pointer.
>
> Is this available in C++03?

AFAIK: This is C++11-only, and while the API is basically lifted from
Boost, the Boost solution for C++03 is not fully general (IIRC only
works with exceptions derived from something-or-other); doing it with
full generality for all possible types of exceptions is only possible
with the C++11 extension.

>
> Does it need people to write "qthrow" instead of "throw"?
>
>> My thoughts are that if a QThread catches an exception that was thrown in
>> the run() method, it could emit a signal that it caught an error with the
>> exception_ptr object as an argument.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt5-feedback mailing list
> Qt5-feedback at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
>
>



-- 
Work is punishment for failing to procrastinate effectively.


More information about the Qt5-feedback mailing list