[Qt-interest] checking the return value of connect
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Fri Jul 8 09:28:33 CEST 2011
> So my question is – should real applications check the return value of
> connect statements. I can see a benefit during development but in the final
> application what can be done if the connect fail?
I think it's always a good practice to check the return value of
connect (unless you're absolutely sure it cannot fail). I've learned
this the hard way as i could have saved a lot of debugging cycles!
As for what should one do if connect fails...well that would depend a
lot on your application logic. Can you still proceed ahead and do
something meaningful if the connect call failed? We mostly do asserts
when such a thing happens...but then again thats during our dev cycles
Just my 2 cents.
-mandeep
>
>
>
> Thanks
>
>
>
>
>
> Graham
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list