Skip to content

Commit 4162f32

Browse files
Update LocalizedException.php
add exception code
1 parent bbe3ee0 commit 4162f32

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: lib/internal/Magento/Framework/Exception/LocalizedException.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ class LocalizedException extends \Exception
2626
protected $logMessage;
2727

2828
/**
29-
* Constructor
30-
*
3129
* @param \Magento\Framework\Phrase $phrase
3230
* @param \Exception $cause
31+
* @param int $code
3332
*/
34-
public function __construct(Phrase $phrase, \Exception $cause = null)
33+
public function __construct(Phrase $phrase, \Exception $cause = null, $code = 0)
3534
{
3635
$this->phrase = $phrase;
37-
parent::__construct($phrase->render(), 0, $cause);
36+
parent::__construct($phrase->render(), intval($code), $cause);
3837
}
3938

4039
/**

0 commit comments

Comments
 (0)