Error checking on input parameters to addons

With reports there’s a class of bugs which arise from the center person not satisfying conditions such as having a spouse/family.

Several addons I reviewed simply fetch the input values and use them without checking for validity. As an example (not picking anyone!), here’s a recently submitted fix for issue #12103 which was missing simple checks around required input. @lordemannd pointed out similar bug reports against other addons (0011775 and 0011814), and there are likely more that haven’t been reported.

These crashes could be easily avoided with error checking on the input based on the addon’s requirements. Catching this before the user clicks OK to execute the addon would also give the user a chance to correct the input.

When writing a report, how/where is error checking supposed to be done on input parameters?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.