Is there an appropriate standard PHP exception which can be used when an array is expected to contain an associative value, which is not correct?
For example, I have a method which takes an array of 'configuration' parameters. Those parameters are validated to check that the required ones are there and that they are of the correct type. If any of the required parameters are incorrect or missing, the exception is thrown.
I was wondering what the most appropriate standard exception would be for this, if one exists at all.
Note
The array key might be missing OR might be present but incorrect value.
The array values may be of any type.
I'm leaning towards UnexpectedValueException