The get/pop CA method cause exception if looked for component is missing
- Oct 28, 2021
-
-
Tomasz Bold authored
Fix of UT issue
-
Tomasz Bold authored
-
Functionality added by this MR is related to new/CA JO. The CAs can be queried for components (i.e. public tools). Typically when no object is found this means a mistake (typo in the name for instance). With this change, such a mistake would result in an exception being raised. This is the default behaviour. In cases when it is actually possible that the component is missing additional option can be provided: acceptAbsent. Then client code can check if the returned value is None and act accordingly.
Tagging @wlampl @mhodgkin @emoyse @goetz @fwinkl @rbielski PS> Launching all unit tests to catch possible mistakes in all areas.