Merge "Replace deprecated wfMsg* calls with Message class calls."
[lhc/web/wiklou.git] / includes / libs / GenericArrayObject.php
index d4cc525..b4b9d61 100644 (file)
@@ -142,11 +142,11 @@ abstract class GenericArrayObject extends ArrayObject {
         * @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() . '.'
                        );
                }