The_Fallen
29th July 2010, 21:23
Hi,
in my Qt app I use exceptions for the error handling. Everything works fine, except for those exceptions that I forgot to catch directly. In those cases the app crashes and has a console output like this:
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
So I assume the problem is that the exception is going through some Qt code and something goes wrong there. Now I thought: Ok, then I'll just catch all exceptions at the top-most level, i.e. the main function, like this.
try {
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
catch (...) {
qDebug() << "CRASH!";
}
Unfortunately this doesn't seem to make a difference, the app still crashes. What am I doing wrong?
Cheers,
fallen
in my Qt app I use exceptions for the error handling. Everything works fine, except for those exceptions that I forgot to catch directly. In those cases the app crashes and has a console output like this:
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
So I assume the problem is that the exception is going through some Qt code and something goes wrong there. Now I thought: Ok, then I'll just catch all exceptions at the top-most level, i.e. the main function, like this.
try {
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
catch (...) {
qDebug() << "CRASH!";
}
Unfortunately this doesn't seem to make a difference, the app still crashes. What am I doing wrong?
Cheers,
fallen