Skip to content

Commit

Permalink
Update LocalizedException.php
Browse files Browse the repository at this point in the history
add exception code
  • Loading branch information
adragus-inviqa authored Apr 22, 2017
1 parent bbe3ee0 commit 4162f32
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ class LocalizedException extends \Exception
protected $logMessage;

/**
* Constructor
*
* @param \Magento\Framework\Phrase $phrase
* @param \Exception $cause
* @param int $code
*/
public function __construct(Phrase $phrase, \Exception $cause = null)
public function __construct(Phrase $phrase, \Exception $cause = null, $code = 0)
{
$this->phrase = $phrase;
parent::__construct($phrase->render(), 0, $cause);
parent::__construct($phrase->render(), intval($code), $cause);
}

/**
Expand Down

0 comments on commit 4162f32

Please sign in to comment.