[Interest] Exceptions

Thiago Macieira thiago.macieira at intel.com
Thu May 23 17:14:01 CEST 2024


On Thursday 23 May 2024 11:57:39 GMT-3 Turtle Creek Software wrote:
> *Qt 6.7 > Best Practice Guides > Exception Safety* as currently written
> seems very reasonable. We'd much rather see that extended to ARM rather
> than abandoned.

That is pending an investigation on whether the frames provided by Apple 
frameworks support unwinding. If they don't, then there's nothing we can do 
and you can argue with Apple.

> This link states that ARM fully supports C++ exception handling:
> https://developer.arm.com/documentation/dui0491/i/C-and-C---Implementation-D
> etails/C---exception-handling

That's irrelevant for Objective C, which is what Apple writes their code in.

> If the problem is with Apple/Cocoa/SwiftUI, would a throw just skip their
> code in the stack unwind?  That might cause unknown errors, but would still
> be better than fast termination.

No, it makes unwinding impossible. You can't unwind a frame if you don't know 
how to unwind it. The only possibility is to std::terminate().

> In a GUI app, there's always a tall pile of QWidgetry on the stack.
> Catching rare errors before it means extra code that will never be used.
> More time and clutter. Throws to the event loop are such an elegant
> solution.

Install a terminate handler instead.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCAI Fleet Engineering and Quality
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240523/4125f250/attachment.bin>


More information about the Interest mailing list