599) { throw new \InvalidArgumentException(sprintf('The specified HTTP code "%d" is invalid.', $httpCode)); } parent::__construct($phrase, null, $code); $this->code = $code; $this->_httpCode = $httpCode; $this->_details = $details; $this->_name = $name; $this->_errors = $errors; $this->_stackTrace = $stackTrace; } /** * Retrieve current HTTP code. * * @return int */ public function getHttpCode() { return $this->_httpCode; } /** * Identify exception originator: sender or receiver. * * @return string */ public function getOriginator() { return $this->getHttpCode() < 500 ? self::FAULT_CODE_SENDER : self::FAULT_CODE_RECEIVER; } /** * Retrieve exception details. * * @return array */ public function getDetails() { return $this->_details; } /** * Retrieve exception name. * * @return string */ public function getName() { return $this->_name; } /** * Retrieve list of errors. * * @return null|\Magento\Framework\Exception\LocalizedException[] */ public function getErrors() { return $this->_errors; } /** * Retrieve stack trace string. * * @return null|string */ public function getStackTrace() { return $this->_stackTrace; } }