/** * @param int $value * @throws \DrdPlus\Tables\Body\Healing\Exceptions\UnexpectedHealingConditionsPercents */ public function __construct($value) { try { parent::__construct($value); } catch (UnexpectedPercents $unexpectedPercents) { throw new Exceptions\UnexpectedHealingConditionsPercents($unexpectedPercents->getMessage()); } }
/** * @param mixed $value * @throws \DrdPlus\Tables\Body\Resting\Exceptions\UnexpectedRestingSituationPercents */ public function __construct($value) { try { parent::__construct($value); } catch (UnexpectedPercents $unexpectedPercents) { throw new Exceptions\UnexpectedRestingSituationPercents($unexpectedPercents->getMessage()); } }
/** * @param mixed $value * @throws \DrdPlus\Tables\Environments\Exceptions\UnexpectedDifficultyPercents */ public function __construct($value) { try { parent::__construct($value); } catch (UnexpectedPercents $unexpectedPercents) { throw new Exceptions\UnexpectedDifficultyPercents($unexpectedPercents->getMessage()); } if ($this->getValue() > 100) { throw new Exceptions\UnexpectedDifficultyPercents('Percents can be from zero to one hundred, got ' . ValueDescriber::describe($value)); } }
/** * @param mixed $value * @throws \DrdPlus\Tables\Equipment\Riding\Exceptions\UnexpectedDefianceOfWildPercents */ public function __construct($value) { try { parent::__construct($value); } catch (UnexpectedPercents $unexpectedPercents) { throw new Exceptions\UnexpectedDefianceOfWildPercents($unexpectedPercents->getMessage()); } if ($this->getValue() > 100) { throw new Exceptions\UnexpectedDefianceOfWildPercents('Expected percents of defiance for wild animal to be from zero to one hundred, got ' . ValueDescriber::describe($value)); } }