InvalidRadiusException class
Exception thrown when a radius value is invalid.
A radius is considered invalid if:
- It is zero
- It is negative
- It exceeds maximum practical value
Example:
try {
final circle = GeoCircle(center: point, radius: -100);
} on InvalidRadiusException catch (e) {
print('Invalid radius: ${e.message}');
}
- Inheritance
-
- Object
- GeoException
- InvalidRadiusException
Constructors
- InvalidRadiusException(String message, {required double invalidValue, double? minValue, double? maxValue, String? code})
-
const
- InvalidRadiusException.negative(double value)
-
Creates an exception for negative radius.
factory
- InvalidRadiusException.tooLarge(double value, double max)
-
Creates an exception for radius that's too large.
factory
- InvalidRadiusException.tooSmall(double value, double min)
-
Creates an exception for radius that's too small.
factory
- InvalidRadiusException.zero()
-
Creates an exception for zero radius.
factory
Properties
- cause → Object?
-
Optional underlying exception
finalinherited
- code → String?
-
Optional error code for programmatic handling
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- invalidValue → double
-
The invalid radius value that caused this exception
final
- maxValue → double?
-
Maximum allowed radius value
final
- message → String
-
Human-readable error message
finalinherited
- minValue → double?
-
Minimum allowed radius value
final
- runtimeType → Type
-
A representation of the runtime type of the object.
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited