Parcourir la source

Throw InvalidArgumentException

Christian Stocker il y a 13 ans
Parent
commit
032c33a245
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      Annotation/Groups.php

+ 2 - 2
Annotation/Groups.php

@@ -18,7 +18,7 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-use JMS\SerializerBundle\Exception\RuntimeException;
+use JMS\SerializerBundle\Exception\InvalidArgumentException;
 
 /**
  * @Annotation
@@ -31,7 +31,7 @@ final class Groups
     public function __construct(array $values)
     {
         if (!isset($values['value']) || !is_array($values['value'])) {
-            throw new RuntimeException('$groups must be a array.');
+            throw new InvalidArgumentException('$groups must be a array.');
         }
         $this->groups = $values['value'];
     }