SerializationException.php 938 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Exception;
  7. use Magento\Framework\Phrase;
  8. /**
  9. * Serialization Exception
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. class SerializationException extends LocalizedException
  15. {
  16. /**
  17. * @deprecated
  18. */
  19. const DEFAULT_MESSAGE = 'Invalid type';
  20. /**
  21. * @deprecated
  22. */
  23. const TYPE_MISMATCH = 'The "%value" value\'s type is invalid. The "%type" type was expected. Verify and try again.';
  24. /**
  25. * @param \Magento\Framework\Phrase $phrase
  26. * @param \Exception $cause
  27. * @param int $code
  28. */
  29. public function __construct(Phrase $phrase = null, \Exception $cause = null, $code = 0)
  30. {
  31. if ($phrase === null) {
  32. $phrase = new Phrase('One or more input exceptions have occurred.');
  33. }
  34. parent::__construct($phrase, $cause, $code);
  35. }
  36. }