DecimalDigitsOutOfRangeError class final

A number of digits, or a power of ten, past what this package will build.

The bound is a million, and it is the same one everywhere: the number of digits a caller asks for when rounding, dividing or printing, the exponent a string is read with, and the power of ten an operation needs on the way. Ten to the billionth is a number nobody can hold, and going for it took the memory of the process rather than answering.

try {
  Decimal.one.round(-1000000000);
} on DecimalDigitsOutOfRangeError catch (e) {
  print(e.invalidValue); // -1000000000
}
Inheritance

Constructors

DecimalDigitsOutOfRangeError(Object? value, [String? name, String? message])
The refusal, naming the argument that asked for it.

Properties

hashCode int
The hash code for this object.
no setterinherited
invalidValue → dynamic
The invalid value.
finalinherited
message → dynamic
Message describing the problem.
finalinherited
name String?
Name of the invalid argument, if available.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The stack trace at the point where this error was first thrown.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited