Anchor | ||||
---|---|---|---|---|
|
In order to prevent the plugins from reporting physically wrong results the validity of actual parameter values are checked during the calculations (Figure 317). In case parameter values exceed the valid range, appropriate exceptions, e.g. RuntimeException, stops the plugin from doing further calculations.
Figure 317: RuntimeException checker in the calculation codes Anchor F317 F317
...
For this, each type of plugins provides the same method consistencyCheck() to perform the recommended checks:
Figure 318: Common method to perform checks Anchor F318 F318
...
In order to avoid conflicts on the consistency check it is therefore very important that all default instances of the plugin types are checked, for instance like this for a PMP:
Figure 319: Example of a PMP checking for the default instances Anchor F319 F319
...
In case you apply nested plugins it is highly recommended to check the validity of these nested plugins inside the consistency check of your 'parent' plugin. The below example of an EPP which uses a nested PMP wants only to show the principle of checking input parameters:
Figure 320: Example of checking the validity of a nested plugin Anchor F320 F320
...