* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ namespace PrestaShop\Module\AutoUpgrade; /** * Todo: Should we create a UpgradeWarning class instead of setting the severity here? */ class UpgradeException extends \Exception { const SEVERITY_ERROR = 1; const SEVERITY_WARNING = 2; private $quickInfos = array(); private $severity = self::SEVERITY_ERROR; public function getQuickInfos() { return $this->quickInfos; } public function getSeverity() { return $this->severity; } public function addQuickInfo($quickInfo) { $this->quickInfos[] = $quickInfo; return $this; } public function setQuickInfos(array $quickInfos) { $this->quickInfos = $quickInfos; return $this; } public function setSeverity($severity) { $this->severity = (int) $severity; return $this; } }