createForUnparsableValue() public static method

public static createForUnparsableValue ( string $value, integer $code, Throwable $previous ) : UnexpectedValueException
$value string
$code integer
$previous Throwable
return UnexpectedValueException
Esempio n. 1
0
 /**
  * @param ParserInterface $parser
  * @param string          $value
  *
  * @return mixed|ValueInterface
  */
 private function parseValue(ParserInterface $parser, string $value)
 {
     try {
         return $parser->parse($value);
     } catch (ParseThrowable $throwable) {
         throw DenormalizerExceptionFactory::createForUnparsableValue($value, 0, $throwable);
     }
 }