ExceptionMessageFactoryInterface.php 650 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Message;
  7. use Magento\Framework\Exception\RuntimeException;
  8. /**
  9. * Interface \Magento\Framework\Message\ExceptionMessageFactoryInterface
  10. *
  11. */
  12. interface ExceptionMessageFactoryInterface
  13. {
  14. /**
  15. * Creates error message based on Exception type and the data it contains
  16. *
  17. * @param \Exception $exception
  18. * @param string $type
  19. * @return MessageInterface
  20. * @throws RuntimeException
  21. */
  22. public function createMessage(\Exception $exception, $type = MessageInterface::TYPE_ERROR);
  23. }