Neomerx\JsonApi\Exceptions\JsonApiException::throwException PHP Method

throwException() public static method

public static throwException ( JsonApiException $exception )
$exception JsonApiException
    public static function throwException(JsonApiException $exception)
    {
        throw $exception;
    }

Usage Example

 /**
  * @inheritdoc
  */
 public function checkQuery(EncodingParametersInterface $parameters)
 {
     $errors = new ErrorCollection();
     $this->checkIncludePaths($errors, $parameters);
     $this->checkFieldSets($errors, $parameters);
     $this->checkFiltering($errors, $parameters);
     $this->checkSorting($errors, $parameters);
     $this->checkPaging($errors, $parameters);
     $this->checkUnrecognized($errors, $parameters);
     $errors->count() <= 0 ?: E::throwException(new E($errors, E::HTTP_CODE_BAD_REQUEST));
 }
All Usage Examples Of Neomerx\JsonApi\Exceptions\JsonApiException::throwException