DivisionByZeroException.php
3 weeks ago
IntegerOverflowException.php
3 weeks ago
MathException.php
3 weeks ago
NegativeNumberException.php
3 weeks ago
NumberFormatException.php
3 weeks ago
RoundingNecessaryException.php
3 weeks ago
RoundingNecessaryException.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | declare (strict_types=1); |
| 4 | namespace IAWPSCOPED\Brick\Math\Exception; |
| 5 | |
| 6 | /** |
| 7 | * Exception thrown when a number cannot be represented at the requested scale without rounding. |
| 8 | * @internal |
| 9 | */ |
| 10 | class RoundingNecessaryException extends MathException |
| 11 | { |
| 12 | /** |
| 13 | * @psalm-pure |
| 14 | */ |
| 15 | public static function roundingNecessary() : RoundingNecessaryException |
| 16 | { |
| 17 | return new self('Rounding is necessary to represent the result of the operation at this scale.'); |
| 18 | } |
| 19 | } |
| 20 |