Qt and exception support....
Hi!
I'am build application for MacOS, Windows and Linux.
In my code I use exceptions (c++ standart), but in Qt I not found exception anywhere, only error code and true|false returning.
May be some OS not support exception? ... and why Qt framework don't use exceptions?
Thanks.
Re: Qt and exception support....
Qt does uses exceptions (hence QT_NO_EXCEPTIONS definition), but not very many of them.
Personally, I prefer to do without them unless I find it's necessary to do a cleanup if the function fails. I would hate to have to litter my code with "try...catch" in case a Qt function threw an exception. A return code is more friendlier, and you can then decide for yourself whether or not to turn it into an exception.