[Kde-pim] if else construct detecting errors

Sergio Martins iamsergio at gmail.com
Mon Nov 25 12:31:18 GMT 2013


On Monday 25 November 2013 13:04:33 Sandro Knauß wrote:
> Hey,
> 
> I wanted to know if there is a rule how to handle else constructs, when
> detecting errors.

Hi,

There are no rules in KDEPIM about this, each developer is using what he likes 
most.

If you need to run cleanup code at function exit do try to minimize return 
statements, there are lots of bugs where people forget to cleanup/emit 
signals, etc. Or keep the returns but use RAII to handle cleanup for you.


Regards,
Sérgio Martins
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list