checkBoundary static method

void checkBoundary(
  1. dynamic number
)

检测数字是否越界,如果越界给出提示 number 数据

Implementation

static void checkBoundary(dynamic number) {
  if (_boundaryCheckingState) {
    if (number > inMaxValue || number < intMinValue) {
      throw Exception(
          '$number is beyond boundary when transfer to integer, the results may not be accurate');
    }
  }
}