Skip to content

Commit 35d3fcc

Browse files
author
Dmytro Poperechnyy
committed
MAGETWO-33814: Change parent class of Model\Exception sub-classes to Localized
- Exception $previous argument changed to LocalizedException $previous;
1 parent 085b274 commit 35d3fcc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/internal/Magento/Framework/Model/Exception.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
*/
66
namespace Magento\Framework\Model;
77

8+
use Magento\Framework\Exception\LocalizedException;
9+
810
/**
911
* Magento Model Exception
1012
*
1113
* This class will be extended by other modules
1214
* @SuppressWarnings(PHPMD.NumberOfChildren)
1315
*/
14-
class Exception extends \Magento\Framework\Exception\LocalizedException
16+
class Exception extends LocalizedException
1517
{
1618
const ERROR_CODE_ENTITY_ALREADY_EXISTS = 456;
1719

@@ -23,9 +25,9 @@ class Exception extends \Magento\Framework\Exception\LocalizedException
2325
/**
2426
* @param string $message
2527
* @param int $code
26-
* @param Exception $previous
28+
* @param LocalizedException $previous
2729
*/
28-
public function __construct($message = "", $code = 0, Exception $previous = null)
30+
public function __construct($message = "", $code = 0, LocalizedException $previous = null)
2931
{
3032
parent::__construct($message);
3133
}

0 commit comments

Comments
 (0)