Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 42
Registered: ‎05-30-2012
My Device: Simulator
My Carrier: Developer
Accepted Solution

Qt exception handling

It's certainly been more than once I got such an output in the console after the application froze in the simulator:

 

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

 How do we go along catching these exceptions? Since neither bb::Application, nor the App class generated for the application subclass QApplication, how do we go along reimplementing QApplication::notify()?

Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Qt exception handling

Check bb::cascades::Application (subclass of bb::Application)

 

Stuart

Contributor
Posts: 42
Registered: ‎05-30-2012
My Device: Simulator
My Carrier: Developer

Re: Qt exception handling

[ Edited ]

Hah, awkward. Well, this question will be the evidence that I should check absoltely everything before posting a question. Hopefully it will help someone else as well. Thanks.

Highlighted
Regular Visitor
Posts: 1
Registered: ‎06-26-2013
My Device: BB10
My Carrier: Fido

Re: Qt exception handling

What was the solution here?

The bb::cascades::Application class doesn't have a "notify()" method on it, only "notify( QObject* receiver, QEvent* event )" method which seems to get called for all sorts of things.