Files
kupshop/bundles/KupShop/OrderingBundle/Exception/DeliveryException.php
2025-08-02 16:30:27 +02:00

39 lines
792 B
PHP

<?php
/**
* Created by PhpStorm.
* User: ondra
* Date: 12.10.17
* Time: 14:39.
*/
namespace KupShop\OrderingBundle\Exception;
class DeliveryException extends \Exception
{
public const ERROR_DELIVERY_DISABLED = 1;
public const ERROR_SOFT = 2;
protected $shortMessage;
private $type;
public function __construct($message = '', $shortMessage = '', $type = self::ERROR_SOFT, $code = 0, ?\Throwable $previous = null)
{
$this->shortMessage = $shortMessage;
$this->type = $type;
parent::__construct($message, $code, $previous);
}
public function isDeliveryDisabled()
{
return $this->type === self::ERROR_DELIVERY_DISABLED;
}
public function getShortMessage()
{
return $this->shortMessage;
}
}