function __construct($value = 0) { $domainException = null; try { parent::__construct($value); } catch (\domainException $domainException) { } if ($domainException || !self::isUnsigned($value)) { throw new \domainException('Value should be an integer greater than or equal to 0'); } }
function __construct($value) { $exception = null; try { parent::__construct($value); } catch (\exception $exception) { } if ($exception || !$value) { throw new \domainException('Divisor should be an integer not equal to 0'); } }