On Wed, Jun 07, 2006 at 09:03:47PM +0000, Angus Leeming wrote:
> Andre Poenitz <[EMAIL PROTECTED]> writes:
> > Ahm... btw: I once had troubles with throwing exceptions through a
> > Qt event loop (basically terminating the loop)
> > 
> > I am not sure this is allowed at all.
> 
> André,
> 
> do exceptions sit well with Qt4 at all? I see occassional flame fests
> on the KDE lists but so much heat is generated that I never bothered
> to search for an intelligent POV.

I use them and never had any troubles except when terminating an event
loop with it. I am not sure what exactly the problem is there.

This is a bit ugly, as this leads to try {} catch () {} blocks in all
event handlers.

The obvious solution would be to add a big catch() in Qt's dispatch
mechanism before terminating it 'manually', but the official TT stance
on exceptions is "We don't throw any, we don't catch any". And they are
about as religious about such things as I am about proper spacing...

I think using exceptions is completely safe otherwise. Problems usually
arise when 'throwing through C code' (i.e. C++ calls C which calls C++
which throws) but I am not aware of any such constellation in Qt.

Andre'

Reply via email to