GeoCalculationException class

Exception thrown when a calculation fails or produces invalid results.

Example:

try {
  final distance = GeoDistanceService.calculateDistance(p1, p2);
} on GeoCalculationException catch (e) {
  print('Calculation error: ${e.message}');
}
Inheritance

Constructors

GeoCalculationException(String message, {required String operation, String? code})
const
GeoCalculationException.areaCalculation([String? detail])
Creates an exception for area calculation failure.
factory
GeoCalculationException.bearingCalculation([String? detail])
Creates an exception for bearing calculation failure.
factory
GeoCalculationException.distanceCalculation([String? detail])
Creates an exception for distance calculation failure.
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
message → String
Human-readable error message
finalinherited
operation → String
The operation that failed
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