Change-Id: Ie744c773b316278e4a92af28354a8fe4eb83b78f
* @param mixed $index
* @param mixed $value
*
- * @throws Exception
+ * @throws InvalidArgumentException
*/
protected function setElement( $index, $value ) {
if ( !$this->hasValidType( $value ) ) {
- throw new Exception(
+ throw new InvalidArgumentException(
'Can only add ' . $this->getObjectType() . ' implementing objects to ' . get_called_class() . '.'
);
}
call_user_func( $function, $list, $element );
$valid = true;
}
- catch ( Exception $exception ) {
+ catch ( InvalidArgumentException $exception ) {
$valid = false;
}