Try catch doesn’t work...
I've been used try/catch in my application, but it can't handle any error, my compiler is MinGW and Qt version is 4.8.2, I've been reconfigure qt with -exceptions, but not work...
also, i want to handle SEH error,
please help me to fix this problem
[Moved to C++ Gurus -- mlong]
This is not a issue of Qt, try/catch designed to deal with C++ exceptions. You should not use them in other cases, such as SEH.
At all, Qt doesn't support exceptions. They are making infrastructure ugly.
Tucnak: That is not correct. Qt does support exceptions, it just does not use them itself in most of its modules. There actually are some that require exceptions though.
[quote author="tucnak" date="1340967790"]They are making infrastructure ugly.[/quote]
This is a matter of taste. I also does not like using exceptions for error handling, but I know many people that do. And they are no newbees or youngsters....
Sorry to interrupt, can someone enlighten me as to what is meant by "SEH error"? I think I've never seen that one before.
[quote author="Tobias Hunger" date="1340968157"]Tucnak: That is not correct. Qt does support exceptions, it just does not use them itself in most of its modules. There actually are some that require exceptions though.[/quote]
Sorry, but I have never seen exceptions in Qt code. And there are no any examples with them.
SEH means Structured Exception Handling, which is Windows only.
[quote author="sierdzio" date="1340970595"]Sorry to interrupt, can someone enlighten me as to what is meant by "SEH error"? I think I've never seen that one before.[/quote]
Ah, many thanks! That's probably why it was unknown to me.
Cheers, and carry on with your topic :)
I think, your original problem is not with MinGW and is not with Qt.
Exceptions are "only" ANSI/ISO C++ problem.
Probably you misunderstand with the exceptions itself.
There is a very good (imho: the best) and FREE book about C++ and of course about exceptions:
Read this :)