José Arcángel Salazar Delgado wrote:
> hi,
>
>
> I 'm trying to catch all the exceptions to log every problem encounter
> in a program, but i cannot catch exceptions from the QApplication.exec()
> method.
>
>
> for example:
>
>
> try{
> ....
> QApplication.exec();
> }
> catch (Throwable t) {
> LOGGER.logp(Level.SEVERE, "SilmGui", "main(String[])", "Excepción", t);
> }
>
>
> is not working if some exception if throw from some slot function.
>
>
> Is there any way to catch exceptions from QApplication in order to log
> these exceptions?
Hi Jose,
There is no way of catching all exceptions that are being fired from
usercode into Qt. Primary reason for this is that if an exception
happens in Java and we return to C++ JNI tends to crash unless we clean
up all java exceptions.
Exceptions that are caught when calling slots are another matter and
could potentially be forwarded, but this is not done today. The code to
look at is at least emit_helper() in
com/trolltech/qt/internal/QSignalEmitterInternal.java. Just search for
"Exception caught after invoking slot"
-
Gunnar
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest