Problem/Motivation
Currently the way we handle exceptions on configuration errors is inconsistent in our process plugins. Sometimes an exception is thrown in the constructor, sometimes we throw exceptions for invalid configurations in the constructor, sometimes we don't do it until the transform method is called. There is some inconsistency in which exceptions get thrown as well.
All plugins should do the following:
If the plugin configuration is invalid, and this can be determined from the configuration alone with no value to transform, the plugins should throw a consistent exception in the constructor, specific exception to be determined.
If the configuration is valid, but certain inputs are not, then the plugin should determine this in the transform method and throw a consistant exception there, exception tbd
In most cases, moving or changing the exception will be a breaking change, so we will likely have to add @trigger_errors in all the places we want to put new exceptions warning people that we will be adding the new exceptions in the next major version, Drupal 10 currently if we can get this into Drupal 9.4. We should have a version of the patch ready for D10 as well that actually adds the excpetions.