Explorar o código

Throw InvalidArgumentException

Christian Stocker %!s(int64=13) %!d(string=hai) anos
pai
achega
032c33a245
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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'];
     }