validateScale static method

void validateScale(
  1. int scale
)

Throws RangeError if a result scale exceeds the supported finite range.

Implementation

static void validateScale(int scale) {
  if (scale < -maxIntegerDigits || scale > maxFractionDigits) {
    throw RangeError.range(
      scale,
      -maxIntegerDigits,
      maxFractionDigits,
      'scale',
    );
  }
}